A fork of the original interface for OS/2. Features a correctly-implemented recv (but retains the old behavior via recv2).
Dependents: weather_clock weather_clock
Diff: Socket/TCPSocketConnection.cpp
- Revision:
- 50:f484783b8a34
- Parent:
- 49:cac09a34102c
diff -r cac09a34102c -r f484783b8a34 Socket/TCPSocketConnection.cpp --- a/Socket/TCPSocketConnection.cpp Sun Mar 31 00:53:46 2019 +0000 +++ b/Socket/TCPSocketConnection.cpp Sun Mar 31 03:08:45 2019 +0000 @@ -125,7 +125,7 @@ return send(data,length); // just remap to send } -int TCPSocketConnection::receive(char* buffer, int length) +int TCPSocketConnection::receive(char* buffer, int length, int offset) { if (!_is_connected) { ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data until you connect to a socket!"); @@ -136,7 +136,7 @@ wait(0.01); } - if (!wifi->recv(buffer, &length)) + if (!wifi->recv(buffer, length, offset)) return -1; return length; @@ -249,7 +249,7 @@ // } // } // return readLen; - if (!wifi->recv(data, &length)) + if (!wifi->recv2(data, &length)) return -1; return length;