コード例 #1
0
 public bool Connect(IPAddress ip, int port)
 {
     if (network != null)
     {
         return(false);
     }
     network = new ClientNetwork(ip, port);
     network.NetworkHandler = this;
     return(network.ConnectAsync());
 }
コード例 #2
0
        public void Dispose()
        {
            OnNetConnecting    = null;
            OnNetConnected     = null;
            OnNetDisconnecting = null;
            OnNetDisconnected  = null;
            OnNetError         = null;

            if (network != null)
            {
                network.Disconnect();
                network = null;
            }
            ProcessReset();
        }