PyDocs

Nav

Networking and Interprocess Communication

socket.accept

socket

method of socket (source) not WASI
  • socket.accept()
accept() -> (socket object, address info)

Wait for an incoming connection.  Return a new socket
representing the connection, and the address of the client.
For IP sockets, the address info is a pair (hostaddr, port).
Changed in 3.4, 3.5
  • 3.4: The socket is now non-inheritable.
  • 3.5: If the system call is interrupted and the signal handler does not raise an exception, the method now retries the system call instead of raising an InterruptedError exception (see PEP 475 for the rationale).
0 Examples
No examples for socket/socket.accept.
See Also
No see-alsos for socket/socket.accept
0 Notes
No notes for socket.accept