NetworkServerEvent()

Syntax

Result = NetworkServerEvent([#Server])
Description
Checks if an event happened on one of the open network servers.

Parameters

#Server (optional) The server to use to check the events. When used, only the events which belongs to this server are handled, all other events are left untouched.

Return value

Returns one of the following values:
  #PB_NetworkEvent_None      : Nothing has happened
  #PB_NetworkEvent_Connect   : A new client has been connected to the server
  #PB_NetworkEvent_Data      : Raw data has been received (to be read with ReceiveNetworkData())
  #PB_NetworkEvent_Disconnect: A client has quit the server (disconnection). Its associated connection is 
                               automatically closed, CloseNetworkConnection() must not be called for this client.

Remarks

The server that received the event can be determined with EventServer(). The client that caused the event can be determined with EventClient().

See Also

ReceiveNetworkData(), EventServer(), EventClient(), CreateNetworkServer()

Supported OS

All

<- NetworkClientEvent() - Network Index - NextIPAddress() ->