_TCPServer_SetParam
Previous Top Next

_TCPServer_SetParam ( int $iSocket , mixed $sPar )

·     $iSocket: The socket where the parameter will be applied.
·     $sPar: The parameter (can be a string, integer, array, bool or anything you want).

Sets the data that will be passed as 4th parameter to the OnReceive callback. As long as you don't send it to the user, only your script will can know its value.

The parameter will be sent on every OnReceive event, and won't be changed as long as you don't change it. Also, it's unique for each client (socket).

This is useful, for example, to save the user's current action, current folder, or whether the user is logged on or not.

As only one parameter is supported, if you must pass more data, consider passing an array.

Return value
            None