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); }
public User(INetworkServerConnector connector) { Connector = connector; }