/// <summary> /// Open a new client with default settings (everything beside accept is set to asynchronic). /// </summary> public NetworkClientBase(CommunicationSettings clientCommunicationSettings) { clientMode = NetworkClientMode.None; this.clientCommunicationSettings = clientCommunicationSettings; skt = new NetworkSocketManagerTCP(); skt.OnSocketEvent += new NetworkSocketManagerTCP.DelegateSocketEventMethod(skt_OnSocketEvent); }
public NetworkServerClientWorker(IPEndPoint targetEndPoint, TimeSpan requiredLatency, CommunicationSettings workerCommunicationSettings) : base(new EndPointsLink(new IPEndPoint(IPAddress.None,0),targetEndPoint).ToString(), requiredLatency) { client = new NetworkClientBase(workerCommunicationSettings); client.OnClientEvent += new NetworkClientBase.DelegateClientEventMethod(client_OnClientEvent); enable = true; }
public NetworkServerClientWorker(TimeSpan requiredLatency, NetworkClientBase clientToAttach, CommunicationSettings workerCommunicationSettings) : base(clientToAttach.ClientEndPointsLink.ToString(), requiredLatency) { client = clientToAttach; client.ClientCommunicationSettings = workerCommunicationSettings; client.OnClientEvent += new NetworkClientBase.DelegateClientEventMethod(client_OnClientEvent); enable = true; }