From 1c98ec94da18c97272e1b0a2c1e43baf0683a187 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 7 Nov 2011 04:20:33 +0100 Subject: Make Connection::Receive return the data via a SharedBuffer reference, so the caller doesn't have to choose the right buffer size in advance. Conflicts: src/test.cpp --- src/test.cpp | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'src/test.cpp') diff --git a/src/test.cpp b/src/test.cpp index db8db4ecc..37412d179 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -852,9 +852,9 @@ struct TestConnection try { u16 peer_id; - u8 data[100]; + SharedBuffer data; infostream<<"** running client.Receive()"< recvdata; u32 size; infostream<<"** running client.Receive()"< 5000) break; try{ - size = client.Receive(peer_id, recvdata, datasize + 1000); + size = client.Receive(peer_id, recvdata); received = true; }catch(con::NoIncomingDataException &e){ } @@ -1116,13 +1116,13 @@ struct TestConnection infostream<<"Received data (size="<20) infostream<<"..."; infostream<