29 #if defined(__linux__)
30 #include <linux/sockios.h>
31 #include <sys/ioctl.h>
32 #elif defined(__APPLE__)
33 #include <sys/socket.h>
43 #if defined(__linux__)
44 if (ioctl(fd, SIOCOUTQ, &queueLength) < 0) {
47 #elif defined(__APPLE__)
48 socklen_t queueLengthSize =
sizeof(queueLength);
49 if (getsockopt(fd, SOL_SOCKET, SO_NWRITE, &queueLength, &queueLengthSize) < 0) {
const ssize_t QUEUE_UNSUPPORTED
indicates that the transport does not support reading the queue capacity/length
const ssize_t QUEUE_ERROR
indicates that the transport was unable to retrieve the queue capacity/length
ssize_t getTxQueueLength(int fd)
obtain send queue length from a specified system socket
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents,...