* Recv wrapper for recv() to enable packet buffering */
| 57 | * Recv wrapper for recv() to enable packet buffering |
| 58 | */ |
| 59 | ssize_t parseBMP::Recv(int sockfd, void *buf, size_t len, int flags) { |
| 60 | ssize_t read = recv(sockfd, buf, len, flags); |
| 61 | |
| 62 | if (read > 0) |
| 63 | if ((bmp_packet_len + read) < BMP_PACKET_BUF_SIZE) { |
| 64 | memcpy(&bmp_packet[bmp_packet_len], buf, read); |
| 65 | bmp_packet_len += read; |
| 66 | } |
| 67 | |
| 68 | return read; |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * Process the incoming BMP message |
nothing calls this directly
no outgoing calls
no test coverage detected