async connections working

--HG--
branch : fastopen
This commit is contained in:
Matt Johnston
2015-02-18 22:46:15 +08:00
parent 8795d733ec
commit 755c1458f0
11 changed files with 108 additions and 105 deletions

View File

@@ -167,6 +167,9 @@ void session_loop(void(*loophandler)()) {
/* set up for channels which can be read/written */
setchannelfds(&readfd, &writefd);
/* Pending connections to test */
set_connect_fds(&writefd);
val = select(ses.maxfd+1, &readfd, &writefd, NULL, &timeout);
if (exitflag) {
@@ -214,11 +217,13 @@ void session_loop(void(*loophandler)()) {
process_packet();
}
}
/* if required, flush out any queued reply packets that
were being held up during a KEX */
maybe_flush_reply_queue();
handle_connect_fds(&writefd);
/* process pipes etc for the channels, ses.dataallowed == 0
* during rekeying ) */
channelio(&readfd, &writefd);