[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: readv() on TCP socket returns 0
"James K. Lowden" <jklowden%schemamania.org@localhost> wrote:
|On Fri, 08 Mar 2013 12:21:45 +0100
|Steffen "Daode" Nurpmeso <sdaoden%gmail.com@localhost> wrote:
|>|Are you saying you can't half-close a TCP connection on OS X? I am
|> And you're damn right, that must have been a Python bug that i've
|> seen back in 2011, and even implemented a workaround for (after
|> painful debugging)!
|The OS X manual is pretty clear on the point,
| "The shutdown() call causes all or part of a full-duplex
|connection on the socket associated with socket to be shut down. If
|how is SHUT_RD, further receives will be disallowed. If how is
|SHUT_WR, further sends will be disallowed. If how is SHUT_RDWR,
|further sends and receives will be disallowed."
My response comes late since this thread made me wonder wether
i've really debugged my shutdown() usage just as i'd written, or
wether i blindly trusted the Python (though Python!)
documentation. Also because only one commit covers the shutdown
So, with Python and enabled shutdown on Mac OS X Snow Leopard
i get this:
# pop.gmail.com/188.8.131.52:995: recv_okline: b'+OK Welcome.'
# pop.gmail.com/184.108.40.206:995: send_line(shut:False): 'LIST'
recv_into len: 29
# pop.gmail.com/220.127.116.11:995: recv_okline: b'+OK 0 messages (0 bytes)'
# pop.gmail.com/18.104.22.168:995: recv_multiline: receiving message content
- pop.gmail.com:INBOX: 0 messages (0 bytes) [seen]
# pop.gmail.com/22.214.171.124:995: send_line(shut:True): 'QUIT'
GOING TO RECEIVE OK AFTER SHUTDOWN
recv_into len: 0
So, with Python, no more +OK line can be read after a call to
With a huge snake blues,
Main Index |
Thread Index |