Messaging
Handling incoming connections is a critical aspect of the Game Carrier Client library. Many APIs within this library are similar to the Server To Server section in the Server API, enabling developers to write code that can seamlessly transition between client and server applications.
The Client API offers a comprehensive set of events and functions to facilitate this process:
Functions:
gc_client_start- opens a connection to an application.gc_client_stop- closes a connection to an application.gc_clinet_add_message- sends a message to an application.gc_client_set_timersets a timer event for a connection.
Events:
on_client_connectevent is called when a new connection is established.on_client_connection_errorevent is called when failure to establish a connection.on_client_disconnectevent is called when a connection is closed.on_client_messageevent is called when a message is received from an application.on_client_message_sendevent is called for every outcomming message from a connection.on_client_timerevent is called when a timer is expired for a specific connection.