Ben Sizer írta: > Martin Bürkle wrote: > >> I have writen a programm using TCP sockets. After i get the connection >> to another socket I cut the Ethernet cable. Then I send a message. >> The program doesnt raise any exception. Can somebody tell me why and >> give me a hint how to get an exception >> > > Have you tried waiting 30 seconds or so? The connection may just take a > while to time out. > I'm not sure if this will help him. He told that the program doesn't raise an exception. I suppose this also means that socket.send() was successful. If his program does not want to send or receive anything else, then he will not get an exception. Otherwise if socket.send() blocks his program, then you are right - he needs to wait. But I think he would have seen that his program is still running, and he would not have written what he wrote. If his program is still running, than he shouldn't have told "it did not raise an exception". :-)
Laszlo -- http://mail.python.org/mailman/listinfo/python-list