version 1.24, 2014/07/20 10:18:10 |
version 1.25, 2014/07/20 10:55:26 |
|
|
return 0; |
return 0; |
} |
} |
|
|
int |
|
NetClose(fd) |
|
int fd; |
|
{ |
|
return close(fd); |
|
} |
|
|
|
|
|
void |
|
NetNonblockingIO(fd, onoff) |
|
int fd; |
|
int onoff; |
|
{ |
|
ioctl(fd, FIONBIO, (char *)&onoff); |
|
} |
|
|
|
|
|
/* |
/* |
* Various signal handling routines. |
* Various signal handling routines. |
*/ |
*/ |
|
|
|
|
setconnmode(0); |
setconnmode(0); |
|
|
NetNonblockingIO(net, 1); |
/* |
|
* Mark the socket as non-blocking and receive urgent data inline. |
|
* (The latter is required for correct telnet operation when a |
|
* second urgent is sent before telnet can process the first.) |
|
*/ |
|
ioctl(net, FIONBIO, &one); |
if (setsockopt(net, SOL_SOCKET, SO_OOBINLINE, &one, sizeof(one)) == -1) { |
if (setsockopt(net, SOL_SOCKET, SO_OOBINLINE, &one, sizeof(one)) == -1) { |
perror("setsockopt"); |
perror("setsockopt"); |
} |
} |