Changeset 227 for vtcross/trunk/src/lib/socketcomm/socketcomm.cpp
- Timestamp:
- 03/31/09 18:38:58 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
vtcross/trunk/src/lib/socketcomm/socketcomm.cpp
r222 r227 41 41 // Messages are termination with a "\0" to denote EOM. 42 42 ssize_t msgLength = recv(socketFD, msgBuffer, 256, MSG_PEEK); 43 if 43 if(msgLength < 0) 44 44 ERROR(1, "Error reading from socket.\n"); 45 if 45 if(msgLength == 0) 46 46 ERROR(1, "Remote component closed connection.\n"); 47 47 … … 54 54 // Read the message into msgBuffer 55 55 msgLength = recv(socketFD, msgBuffer, i + 1, 0); 56 if 56 if(msgLength < 0) 57 57 ERROR(1, "Error reading from socket.\n"); 58 if 58 if(msgLength == 0) 59 59 ERROR(1, "Remote component closed connection.\n"); 60 60 }