Network\Socket::on_connect PHP Method

on_connect() public method

Registers a new handle for new client connections.
public on_connect ( callable $function ) : object
$function callable Function to call on connect.
return object
    public function on_connect($function)
    {
        return xp_signal(new SIG_Connect($this), $function);
    }