public void UnRegisterTCPHandler(ITCPHandler handler) { lock (Handlers) { Handlers.Remove(handler); } }
private static bool IsHandlerTimeout(DateTime now, ITCPHandler handler1) { return(now - handler1.LastActivity > HandlerTimeout); }
/// <summary> /// Initializes a new instance of the <see cref="FlightSimulatorModel"/> class. /// </summary> public FlightSimulatorModel() { this.tcpHandler = new FlightGearTCPHandler(new TelnetClientV2()); this.tcpHandler.PropertyChanged += this.PropertyChangedHandler; }
/// <summary> /// Initializes a new instance of the <see cref="FlightSimulatorModel"/> class. /// </summary> /// <param name="tcpHandler">The TCP handler.</param> public FlightSimulatorModel(ITCPHandler tcpHandler) { this.tcpHandler = tcpHandler; this.tcpHandler.PropertyChanged += this.PropertyChangedHandler; }
public TCPServer(int port, ILoggingService ils, ITCPHandler tcpHandler) { this.Port = port; this.Ils = ils; this.TCPHandler = tcpHandler; }