コード例 #1
0
 public void Initalize()
 {
     Debug.Log("Creating Server");
     _server  = new Server(_packets.GetPacketData());
     Registry = _server.Registry;
     Initalized?.Invoke();
 }
コード例 #2
0
 public void Initalize()
 {
     if (_client != null)
     {
         Debug.Log("Destroying Old Client");
         _client.Disconnected -= OnDisconnect;
     }
     Debug.Log("Creating Client");
     _client                      = new Client(_packets.GetPacketData());
     Registry                     = _client.Registry;
     _client.Disconnected        += OnDisconnect;
     _client.ConnectionFinalized += OnConnectionFinalized;
     Initalized?.Invoke();
 }