示例#1
0
        public static INetworkServerConnector GetServerConnector(TcpClient tcp)
        {
            INetworkServerConnector nc = null;

            try
            {
                nc = new NetworkServerConnector(tcp);
            }
            catch (ArgumentNullException ex)
            {
                Debug.WriteLine("Connector null adress connect crash: " + ex.ToString());
            }
            catch (SocketException ex)
            {
                Debug.WriteLine("Connector null adress connect crash: " + ex.ToString());
            }
            catch (ObjectDisposedException ex)
            {
                Debug.WriteLine("Connector socket is closed connect crash: " + ex.ToString());
            }
            return(nc);
        }
示例#2
0
 public User(INetworkServerConnector connector)
 {
     Connector = connector;
 }