diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-25 15:53:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-25 15:53:56 +0200 |
commit | 3cea7a349ac55df93b3eac1bf40365e00e472480 (patch) | |
tree | f1b45da38389e406c242d83f581f016f542b9300 /src/unittest | |
parent | f6a33a1a7a298cb7d3fb18818bae97bd1b89d633 (diff) | |
download | minetest-3cea7a349ac55df93b3eac1bf40365e00e472480.tar.gz minetest-3cea7a349ac55df93b3eac1bf40365e00e472480.tar.bz2 minetest-3cea7a349ac55df93b3eac1bf40365e00e472480.zip |
Network cleanup (#6310)
* Move Connection threads to dedicated files + various cleanups
* ConnectionReceiveThread::processPacket now uses function pointer table to route MT packet types
* Various code style fixes
* Code style with clang-format
* Various SharedBuffer copy removal
* SharedBuffer cannot be copied anymore using Buffer
* Fix many SharedBuffer copy (thanks to delete operator)
Diffstat (limited to 'src/unittest')
-rw-r--r-- | src/unittest/test_connection.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/unittest/test_connection.cpp b/src/unittest/test_connection.cpp index 5a2e32ca8..dcfc3b4e5 100644 --- a/src/unittest/test_connection.cpp +++ b/src/unittest/test_connection.cpp @@ -115,7 +115,7 @@ void TestConnection::testHelpers() infostream<<"data1[0]="<<((u32)data1[0]&0xff)<<std::endl;*/ UASSERT(p2.getSize() == 3 + data1.getSize()); - UASSERT(readU8(&p2[0]) == TYPE_RELIABLE); + UASSERT(readU8(&p2[0]) == con::PACKET_TYPE_RELIABLE); UASSERT(readU16(&p2[1]) == seqnum); UASSERT(readU8(&p2[3]) == data1[0]); } @@ -290,13 +290,13 @@ void TestConnection::testConnectSendReceive() infostream << "..."; infostream << std::endl; - Buffer<u8> sentdata = pkt.oldForgePacket(); + SharedBuffer<u8> sentdata = pkt.oldForgePacket(); server.Send(peer_id_client, 0, &pkt, true); //sleep_ms(3000); - Buffer<u8> recvdata; + SharedBuffer<u8> recvdata; infostream << "** running client.Receive()" << std::endl; u16 peer_id = 132; u16 size = 0; |