Method _Stdio._port()->accept()


Method accept

Stdio.File accept()

Description

Get the first connection request waiting for this port and return it as a connected socket.

If no connection request is waiting and the port is in nonblocking mode (i.e. an accept callback is installed) then zero is returned. Otherwise this function waits until a connection has arrived.

In Pike 7.8 and later the returned object is created via fd_factory().

Note

In Pike 7.7 and later the resulting file object will be assigned to the same backend as the port object.