HolyLib Wiki

IGModAudioChannelEncoder:SetServerCallback

  IGModAudioChannelEncoder:SetServerCallback( function callback )

Description

Sets the callback that is called whenever a client connects to or disconnects from the server set up by IGModAudioChannelEncoder:ServerInit.

The callback is expected to return a boolean to allow/deny the connection, and optionally a string to send as extra HTTP headers when a client connects.
If no callback is set, all connections are allowed.

Arguments

1function callback

The new callback function

Function argument(s):
1boolean connect -

true if the client is connecting, false if it is disconnecting

2string client -

The IP address (and port) of the client

Function return argument(s):