fixed a minor but annoying bug in ClientSocket/ServerSocket.recv()

master
Phitherek 2013-03-03 01:15:45 +01:00
parent d19e5671d2
commit 94df6b68ca
9 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,7 @@ int ClientSocket::send(std::string msg, int flags=0) {
}
int ClientSocket::recv(int flags) {
memset(&_buf[0], 0, sizeof(_buf));
if(_protocol == "TCP") {
int rr = ::recv(_descriptor, buf, 99999, flags);
if(rr == -1) {

BIN
ClientSocket.o Normal file

Binary file not shown.

BIN
HTTPClientSocket.o Normal file

Binary file not shown.

BIN
NetSocket.o Normal file

Binary file not shown.

BIN
NetworkException.o Normal file

Binary file not shown.

View File

@ -121,6 +121,7 @@ int ServerSocket::send(std::string msg, int flags) {
}
int ServerSocket::recv(int flags) {
memset(&_buf[0], 0, sizeof(_buf));
if(_protocol == "TCP") {
int rr = ::recv(_newDescriptor, _buf, 99999, flags);
if(rr == -1) {

BIN
ServerSocket.o Normal file

Binary file not shown.

BIN
SocketException.o Normal file

Binary file not shown.

BIN
libnetsocketpp.so.0.1 Executable file

Binary file not shown.