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_timer
sets a timer event for a connection.
Events:
on_client_connect
event is called when a new connection is established.on_client_connection_error
event is called when failure to establish a connection.on_client_disconnect
event is called when a connection is closed.on_client_message
event is called when a message is received from an application.on_client_message_send
event is called for every outcomming message from a connection.on_client_timer
event is called when a timer is expired for a specific connection.