Lines Matching defs:sock
104 sock = None
132 self.sock = socket.create_connection((self.host, self.port), self.timeout)
133 self.af = self.sock.family
134 self.file = self.sock.makefile('rb')
173 self.sock.sendall(line)
236 self.sock.sendall(line, MSG_OOB)
277 sock = None
281 sock = socket.socket(af, socktype, proto)
282 sock.bind(sa)
284 if sock:
285 sock.close()
286 sock = None
289 if sock is None:
294 sock.listen(1)
295 port = sock.getsockname()[1] # Get proper port
296 host = self.sock.getsockname()[0] # Get proper host
302 sock.settimeout(self.timeout)
303 return sock
309 host, port = parse229(self.sendcmd('EPSV'), self.sock.getpeername())
349 sock = self.makeport()
359 conn, sockaddr = sock.accept()
363 sock.close()
590 if self.sock is not None:
591 self.sock.close()
592 self.file = self.sock = None
642 if secure and not isinstance(self.sock, ssl.SSLSocket):
648 if isinstance(self.sock, ssl.SSLSocket):
654 self.sock = ssl.wrap_socket(self.sock, self.keyfile, self.certfile,
656 self.file = self.sock.makefile(mode='rb')