| 262 | } |
| 263 | |
| 264 | int receiveMessage() |
| 265 | { |
| 266 | int msg; |
| 267 | int ret = receiveData(&msg, sizeof(int)); |
| 268 | #ifdef LIBTAS_LIBRARY |
| 269 | LOG(LL_DEBUG, LCF_SOCKET, "Receive socket message %d", msg); |
| 270 | #endif |
| 271 | /* Handle special case for closed socket */ |
| 272 | if (ret == 0) |
| 273 | return -2; |
| 274 | |
| 275 | if (ret < 0) |
| 276 | return ret; |
| 277 | return msg; |
| 278 | } |
| 279 | |
| 280 | int receiveMessageNonBlocking() |
| 281 | { |
no test coverage detected