static bool receive_record(void *handle, uint8_t type, const void *data, uint16_t len) {
(void)handle;
+
if(verbose) {
fprintf(stderr, "Received type %d record of %u bytes:\n", type, len);
}
}
char buf[65535] = "";
+ size_t readsize = datagram ? 1460u : sizeof(buf);
fd_set fds;
FD_ZERO(&fds);
}
if(FD_ISSET(in, &fds)) {
- ssize_t len = read(in, buf, sizeof(buf));
+ ssize_t len = read(in, buf, readsize);
if(len < 0) {
fprintf(stderr, "Could not read from stdin: %s\n", strerror(errno));