MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / connect

Method connect

tools/python-3.11.9-amd64/Lib/asyncore.py:333–345  ·  view source on GitHub ↗
(self, address)

Source from the content-addressed store, hash-verified

331 return self.socket.bind(addr)
332
333 def connect(self, address):
334 self.connected = False
335 self.connecting = True
336 err = self.socket.connect_ex(address)
337 if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \
338 or err == EINVAL and os.name == 'nt':
339 self.addr = address
340 return
341 if err in (0, EISCONN):
342 self.addr = address
343 self.handle_connect_event()
344 else:
345 raise OSError(err, errorcode[err])
346
347 def accept(self):
348 # XXX can return either an address pair or None

Callers

nothing calls this directly

Calls 2

handle_connect_eventMethod · 0.95
connect_exMethod · 0.80

Tested by

no test coverage detected