Due to the asynchronous nature of networking, a lot of networking information will only be available through the event system. For example, when a socket receives data, a new event will be pushed that contains the socket ID and the contents of the message.
Relevant events are:
For a full description of of these events, see the Events page. The important thing to remember is that the socketconnected event will push a new socket object while other socket events will only push a socket ID. As such, you should be sure to save the new socket object (preferably into a table) if your script will be accepting new connections.
Create a new
See the Socket class page for details on methods.
Page last updated at 2018-09-25 20:48:17