Name

accept

Synopsis

                        s.accept( )

Accepts a connection request and returns a pair ( s1 ,( ipaddr,port )), where s1 is a new connected socket and ipaddr and port are the IP address and port number of the counterpart. s must be of type SOCK_STREAM, and you must have previously called s .bind and s .listen. If no client is trying to connect, accept blocks until some client tries to connect.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.