public RpcClient() { taskScanner = new RpcTaskScanner(); userProcessors = new ConcurrentDictionary <Type, UserProcessor>(); connectionEventHandler = new RpcConnectionEventHandler(switches()); connectionEventListener = new ConnectionEventListener(); }
public virtual void addConnectionEventListener(ConnectionEventListener listener) { if (listener == null) { throw new System.ArgumentException("Listener is null"); } listeners.Add(listener); }
public Connection(TcpClient c, ConnectionEventListener l) { this.client = c; this.stream = c.GetStream(); this.handle = l; this.message_delta_time = 0; this.connected = c.Connected; this.ip_endpoint = this.client.Client.RemoteEndPoint.ToString(); }