Connecting to server from client

First, You need to create a client object with Proud.CNetClient.Create. Then Proud.CNetClient instance will be returned.

Next, you need to request connecting to server by calling Proud.CNetClient.Connect. Proud.CNetClient.Connect gets returned instantly and from that point on, you can start client loop unitll Proud.INetClientEvent.OnJoinServerComplete arrives.

If you receive Proud.INetClientEvent.OnJoinServerComplete event from client, then the process of connecting to server is completed. At this time, the success or fail of connection with server must be determined.

Events that could occur while client is connecting to server

Exchanging custom data while connecting to server

client_connect.png
The process of connecting to server from client