version 1.50, 2001/02/11 12:59:25 |
version 1.51, 2001/02/12 22:56:09 |
|
|
FD_SET(connection_in, &set); |
FD_SET(connection_in, &set); |
|
|
/* Wait for some data to arrive. */ |
/* Wait for some data to arrive. */ |
select(connection_in + 1, &set, NULL, NULL, NULL); |
while (select(connection_in + 1, &set, NULL, NULL, NULL) == -1 && |
|
(errno == EAGAIN || errno == EINTR)) |
|
; |
|
|
/* Read data from the socket. */ |
/* Read data from the socket. */ |
len = read(connection_in, buf, sizeof(buf)); |
len = read(connection_in, buf, sizeof(buf)); |
|
|
packet_write_poll(); |
packet_write_poll(); |
while (packet_have_data_to_write()) { |
while (packet_have_data_to_write()) { |
fd_set set; |
fd_set set; |
|
|
FD_ZERO(&set); |
FD_ZERO(&set); |
FD_SET(connection_out, &set); |
FD_SET(connection_out, &set); |
select(connection_out + 1, NULL, &set, NULL, NULL); |
while (select(connection_out + 1, NULL, &set, NULL, NULL) == -1 && |
|
(errno == EAGAIN || errno == EINTR)) |
|
; |
packet_write_poll(); |
packet_write_poll(); |
} |
} |
} |
} |