accept


Description:

public Socket accept (Cancellable? cancellable = null) throws Error

Accept incoming connections on a connection-based socket.

This removes the first outstanding connection request from the listening socket and creates a Socket object for it.

The this must be bound to a local address with bind and must be listening for incoming connections (listen).

If there are no outstanding connections then the operation will block or return g_io_error_would_block if non-blocking I/O is enabled. To be notified of an incoming connection, wait for the g_io_in condition.

Parameters:

this

a Socket.

cancellable

a gcancellable or null

Returns:

a new Socket, or null on error. Free the returned object with unref.




2022 vala-language.org