Pike v8.1 release 6

Method Stdio.Port()->accept()


Method accept

File accept()

Description

This function completes a connection made from a remote machine to this port. It returns a two-way stream in the form of a clone of Stdio.File. The new file is by initially set to blocking mode.

See also

Stdio.File


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.