Core Function SSRecv
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> SSRecv( <server/client> ) </pre> === Description === Check for a message recieved from client/server. === Parameters === ==== <server/client> ==== The server/client ob...") |
(→Success if first param is SERVER) |
||
Line 20: | Line 20: | ||
$array[0] = MessageType | $array[0] = MessageType | ||
+ | |||
$array[1] = ClientSocket | $array[1] = ClientSocket | ||
+ | |||
$array[2] = ClientUniqueID | $array[2] = ClientUniqueID | ||
+ | |||
$array[3] = ClientIP | $array[3] = ClientIP | ||
Revision as of 12:48, 1 December 2011
SSRecv( <server/client> )
Contents |
Description
Check for a message recieved from client/server.
Parameters
<server/client>
The server/client object to use.
Return Value
Success if first param is SERVER
Returns an array with 4 items the MessageType, client socket, client unique id, client ip from the message recieved
$array[0] = MessageType
$array[1] = ClientSocket
$array[2] = ClientUniqueID
$array[3] = ClientIP
Success if first param is CLIENT
Returns an array with only 1 item the MessageType from the message recieved
$array[0] = MessageType
Failure
Failure: Returns 0.
Remarks
This is NOT a generic socket toolset; You can't use this to connect to anything instead it is used to connect Sputnik clients with Sputnik servers in a very easy to use way.
Example
See the Listen() and Connect() for examples