[issue15215] socket module setblocking and settimeout problem

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Frank, this bug tracker is not for posting general programming questions. Please see http://mail.python.org/mailman/listinfo/python-list instead. -- ___ Python tracker ___

[issue15215] socket module setblocking and settimeout problem

2012-06-28 Thread Frank Ling
Frank Ling added the comment: how to create socket and have block timeout mode? self.socket.setblocking(1) self.socket.settimeout(1) this program is error? -- ___ Python tracker __

[issue15215] socket module setblocking and settimeout problem

2012-06-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, this is normal. Timeout sockets use a non-blocking fd internally: http://docs.python.org/dev/library/socket.html#notes-on-socket-timeouts This won't be visible to you if you only use the socket object, but it will if you call fileno() and use the file des

[issue15215] socket module setblocking and settimeout problem

2012-06-28 Thread Frank Ling
New submission from Frank Ling : i use socket such as : self.socket.setblocking(1) self.socket.settimeout(1) but this socket is no-block ,i find socketmodule.c sock_settimeout s->sock_timeout = timeout; internal_setblocking(s, timeout < 0.0); if timeout >0, so internal_s