send(fd, buf, sizeof(buf) - 1, 0);
}
+ struct linger linger = { .l_onoff = 1, .l_linger = 0 };
+ setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
+
close(fd);
break; /* jump out and re-register a new io request */
}
send(fd, buf, i, 0);
}
+ struct linger linger = { .l_onoff = 1, .l_linger = 0 };
+ setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger));
+
close(fd);
continue; /* drop the one and keep on clearing the queue */
}