MCPcopy Create free account
hub / github.com/SNAS/openbmp / Recv

Method Recv

Server/src/bmp/parseBMP.cpp:59–69  ·  view source on GitHub ↗

* Recv wrapper for recv() to enable packet buffering */

Source from the content-addressed store, hash-verified

57 * Recv wrapper for recv() to enable packet buffering
58 */
59ssize_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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected