/// <summary> /// Construct a new client to the specified host and port /// </summary> /// <param name="hostName"></param> /// <param name="port"></param> /// <param name="sessionProvider"></param> public Client(string hostName, int port, AppKeyAndSessionProvider sessionProvider) { _hostName = hostName; _port = port; _sessionProvider = sessionProvider; _processor = new RequestResponseProcessor(SendLine); _processor.ConnectionStatusChanged += DispatchConnectionStatusChanged; //default properties AutoReconnect = true; Timeout = TimeSpan.FromSeconds(30); ReconnectBackOff = TimeSpan.FromSeconds(15); KeepAliveHeartbeat = TimeSpan.FromHours(1); }
public void Init() { Processor = new RequestResponseProcessor(line => LastLine = line); }