How to use TCP Client
How To Establish A TCP Connection
After you obtain the connection endpoint along with encryption keys, you may establish a connection using TCP client as shown below:
When a connection is successfully established, OnCreate is raised. If it fails, OnException is raised.
The example below will change connection methods internally if the network is IPv6 enabled.
Calling Update Method
C# client needs to call its Update method at a certain interval. For Unity game engine, It needs to be called in Unity’s Update method which is called at every frame.
How To Terminate A TCP Connection
When successfully disconnected, OnDisconnect will be raised.
Last updated