// // Write the booleans that this object uses to a BooleanStream // public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) { KeepAliveInfo info = (KeepAliveInfo)o; int rc = base.TightMarshal1(wireFormat, info, bs); return(rc + 0); }
protected virtual void WriteKeepAliveInfo(KeepAliveInfo command, BinaryWriter dataOut) { StompFrame frame = new StompFrame(StompFrame.KEEPALIVE); if (Tracer.IsDebugEnabled) { Tracer.Debug("StompWireFormat - Writing " + frame.ToString()); } frame.ToStream(dataOut); }
public bool Iterate() { if (this.pending.CompareAndSet(true, false) && this.parent.monitorStarted.Value) { try { KeepAliveInfo info = new KeepAliveInfo(); this.parent.next.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); } } }
protected override void OnCommand(ITransport sender, Command command) { commandReceived.Value = true; inRead.Value = true; try { if (command.IsKeepAliveInfo) { KeepAliveInfo info = command as KeepAliveInfo; if (info.ResponseRequired) { try { info.ResponseRequired = false; Oneway(info); } catch (IOException ex) { OnException(this, ex); } } } else if (command.IsWireFormatInfo) { lock (monitor) { remoteWireFormatInfo = command as WireFormatInfo; try { StartMonitorThreads(); } catch (IOException ex) { OnException(this, ex); } } } base.OnCommand(sender, command); } finally { inRead.Value = false; } }
public Boolean Iterate() { if (!_pending.CompareAndSet(true, false) || !_parent._monitorStarted.Value) { return(_pending.Value); } try { var info = new KeepAliveInfo(); _parent.Next.Oneway(info); } catch (IoException ex) { _parent.OnException(_parent, ex); } return(_pending.Value); }
public bool Iterate() { Tracer.Debug("AsyncWriteTask perparing for another Write Check"); if (this.parent.monitorStarted.Value) { try { Tracer.Debug("AsyncWriteTask Write Check required sending KeepAlive."); KeepAliveInfo info = new KeepAliveInfo(); this.parent.Oneway(info); } catch (IOException e) { this.parent.OnException(parent, e); } } return(false); }
protected void OnKeepAliveCommand(ITransport commandTransport, KeepAliveInfo info) { Tracer.Info("Keep alive message received."); if (info.ResponseRequired) { try { info.ResponseRequired = false; OneWay(info); } catch (Exception ex) { if (!closing && !closed) { OnException(commandTransport, ex); } } } }
public bool Iterate() { Tracer.DebugFormat("InactivityMonitor[{0}] perparing 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(); this.parent.next.Oneway(info); } catch (IOException e) { this.parent.OnException(parent, e); } } return(this.pending.Value); }
protected void OnKeepAliveCommand(ITransport commandTransport, KeepAliveInfo info) { Tracer.Debug("Keep alive message received."); try { if (connected.Value) { Tracer.Debug("Returning KeepAliveInfo Response."); info.ResponseRequired = false; transport.Oneway(info); } } catch (Exception ex) { if (!closing.Value && !closed.Value) { OnException(ex); } } }
protected virtual void WriteKeepAliveInfo(KeepAliveInfo command, BinaryWriter dataOut) { var frame = new StompFrame(StompFrame.Keepalive, _encodeHeaders); frame.ToStream(dataOut); }
protected virtual void WriteKeepAliveInfo(KeepAliveInfo command, BinaryWriter dataOut) { dataOut.Write((byte)'\n'); }
public virtual Response processKeepAliveInfo(KeepAliveInfo info) { return(null); }