protected void OnKeepAliveCommand(ITransport commandTransport, KeepAliveInfo info) { Tracer.Info("Keep alive message received."); try { if(connected.Value) { Tracer.Info("Returning KeepAliveInfo Response."); info.ResponseRequired = false; transport.Oneway(info); } } catch(Exception ex) { if(!closing.Value && !closed.Value) { OnException(ex); } } }
public virtual Response processKeepAliveInfo(KeepAliveInfo info) { return null; }
public bool Iterate() { Tracer.DebugFormat("InactivityMonitor[{0}] preparing for another Write Check", parent.instanceId); if(this.pending.CompareAndSet(true, false) && this.parent.monitorStarted.Value) { try { Tracer.DebugFormat("InactivityMonitor[{0}] Write Check required sending KeepAlive.", parent.instanceId); KeepAliveInfo info = new KeepAliveInfo(); info.ResponseRequired = this.parent.keepAliveResponseRequired.Value; this.parent.Oneway(info); } catch(IOException e) { this.parent.OnException(parent, e); } } return this.pending.Value; }
protected void OnKeepAliveCommand(ITransport commandTransport, KeepAliveInfo info) { try { if (connected.Value) { info.ResponseRequired = false; transport.Oneway(info); } } catch(Exception ex) { if(!closing.Value && !closed.Value) { OnException(ex); } } }