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


#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 (not available with #PB_Network_UDP connections)
  #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.
                               (Not available with #PB_Network_UDP connections.)


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


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