Setting Up Room Module With TCP or UDP Client

Room module is network protocol agnostic, but it needs to have a network client passed to it.

We will explain how to set up a room module instance with TCP or UDP client.

 

TCP Example: How to create a connection using the TCP client is explained here.

Diarkis.Tcp tcp = new Diarkis.Tcp();
Diarkis.Modules.Room room = new Diarkis.Modules.Room();
// This is how you pass a TCP client instance
room.SetupAsTcp(tcp);

 

UDP Example: How to create a connection using the UDP client is explained here.

Diarkis.Udp udp = new Diarkis.Udp();
Diarkis.Modules.Room room = new Diarkis.Modules.Room();
// This is how you pass a UDP client instance
room.SetupAsUdp(udp);