version 1.5, 1999/09/30 05:11:29 |
version 1.6, 1999/09/30 05:53:04 |
|
|
{ |
{ |
/* Set IP options for an interactive connection. Use IPTOS_LOWDELAY |
/* Set IP options for an interactive connection. Use IPTOS_LOWDELAY |
and TCP_NODELAY. */ |
and TCP_NODELAY. */ |
#ifdef IPTOS_LOWDELAY |
|
int lowdelay = IPTOS_LOWDELAY; |
int lowdelay = IPTOS_LOWDELAY; |
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *)&lowdelay, |
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *)&lowdelay, |
sizeof(lowdelay)) < 0) |
sizeof(lowdelay)) < 0) |
error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); |
error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); |
#endif /* IPTOS_LOWDELAY */ |
|
if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *)&on, |
if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *)&on, |
sizeof(on)) < 0) |
sizeof(on)) < 0) |
error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); |
error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); |
|
|
{ |
{ |
/* Set IP options for a non-interactive connection. Use |
/* Set IP options for a non-interactive connection. Use |
IPTOS_THROUGHPUT. */ |
IPTOS_THROUGHPUT. */ |
#ifdef IPTOS_THROUGHPUT |
|
int throughput = IPTOS_THROUGHPUT; |
int throughput = IPTOS_THROUGHPUT; |
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *)&throughput, |
if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *)&throughput, |
sizeof(throughput)) < 0) |
sizeof(throughput)) < 0) |
error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno)); |
error("setsockopt IPTOS_THROUGHPUT: %.100s", strerror(errno)); |
#endif /* IPTOS_THROUGHPUT */ |
|
} |
} |
} |
} |
|
|