From: Кирилл on 10 Feb 2010 10:34 Hi all, I have got a small script for upload file on http server, and I need interrupt uploading if I get tired wait. I create socket: self.conn = httplib.HTTPConnection("192.168.0.195") #self.conn.debuglevel = 1 self.conn.request("POST", "/upload/", body, head) if self.conn.sock: self.conn.sock.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack("ii", 1, 0)) and close it in other thread: if self.conn.sock: self.conn.close() Python notify me what socket have closed, but he continues to send data. As can I close it and stop sending of the data? Best Regards, Kirill.
|
Pages: 1 Prev: Function attributes Next: Is a merge interval function available? |