[Python-Dev] [Python-checkins] r42185 - python/trunk/Lib/test/test_socket_ssl.py (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Thu Jan 26 06:57:13 CET 2006
- Previous message: [Python-Dev] [Python-checkins] r42185 - python/trunk/Lib/test/test_socket_ssl.py
- Next message: [Python-Dev] DRAFT: python-dev Summary for 2006-01-01 through 2006-01-15
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Neal Norwitz wrote:
That's what I was thinking of. I thought you had to be accept()ing prior to connect() working. I thought listen() only sets the # of outstanding connections allowed (basically internal buffer). But if the listen() is sufficient, I agree there is no race.
Actually, that's the whole point of listen(). Even if you initially do accept() quickly, it might be that another connection request (SYN) arrives between return of accept() and the next call to accept(); this is essentially the same as connection requests arriving before the first accept() call.
The kernel will acknowledge the SYN packet immediately, and do that for at most "number-of-backlog" incoming connections. Then, subsequent accept() calls will immediately return.
Regards, Martin
- Previous message: [Python-Dev] [Python-checkins] r42185 - python/trunk/Lib/test/test_socket_ssl.py
- Next message: [Python-Dev] DRAFT: python-dev Summary for 2006-01-01 through 2006-01-15
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]