Example #1
0
 /// <summary>
 /// </summary>
 /// <param name="client"></param>
 public ClientSession(TcpClient client, NetworkListener parent)
 {
     InstanceId  = _instanceCount;
     this.parent = parent;
     _instanceCount++;
     Authenticated = false;
     _client       = client;
 }
Example #2
0
 /// <summary>
 /// type "init" to call this function
 /// </summary>
 /// <param name="start"></param>
 /// <param name="cmds"></param>
 static void CMD_Init(int start, params string[] cmds)
 {
     if (nl == null || nl != null && !nl.isStarted)
     {
         nl = new NetworkListener(50);
         Debug.Log(0, "Initialized Sucessfully.");
     }
     else
     {
         Debug.Log(0, "Server is started. can not initialize while the server is running.");
     }
 }