MCPcopy Index your code
hub / github.com/RustPython/RustPython / connect

Method connect

Lib/test/support/asyncore.py:344–356  ·  view source on GitHub ↗
(self, address)

Source from the content-addressed store, hash-verified

342 return self.socket.bind(addr)
343
344 def connect(self, address):
345 self.connected = False
346 self.connecting = True
347 err = self.socket.connect_ex(address)
348 if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \
349 or err == EINVAL and os.name == 'nt':
350 self.addr = address
351 return
352 if err in (0, EISCONN):
353 self.addr = address
354 self.handle_connect_event()
355 else:
356 raise OSError(err, errorcode[err])
357
358 def accept(self):
359 # XXX can return either an address pair or None

Callers

nothing calls this directly

Calls 2

handle_connect_eventMethod · 0.95
connect_exMethod · 0.45

Tested by

no test coverage detected