本文整理汇总了C#中INextFilter.SessionIdle方法的典型用法代码示例。如果您正苦于以下问题:C# INextFilter.SessionIdle方法的具体用法?C# INextFilter.SessionIdle怎么用?C# INextFilter.SessionIdle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类INextFilter
的用法示例。
在下文中一共展示了INextFilter.SessionIdle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SessionIdle
/// <inheritdoc/>
public virtual void SessionIdle(INextFilter nextFilter, IoSession session, IdleStatus status)
{
nextFilter.SessionIdle(session, status);
}
示例2: SessionIdle
public override void SessionIdle(INextFilter nextFilter, IoSession session, IdleStatus status)
{
test.testResult += id + "SI";
nextFilter.SessionIdle(session, status);
}
示例3: SessionIdle
/// <inheritdoc/>
public override void SessionIdle(INextFilter nextFilter, IoSession session, IdleStatus status)
{
if (status == _interestedIdleStatus)
{
if (!session.ContainsAttribute(WAITING_FOR_RESPONSE))
{
Object pingMessage = _messageFactory.GetRequest(session);
if (pingMessage != null)
{
nextFilter.FilterWrite(session, new DefaultWriteRequest(pingMessage));
//session.Write(pingMessage);
// If policy is OFF, there's no need to wait for
// the response.
if (_requestTimeoutHandler != KeepAliveRequestTimeoutHandler.DeafSpeaker)
{
MarkStatus(session);
if (_interestedIdleStatus == IdleStatus.BothIdle)
{
session.SetAttribute(IGNORE_READER_IDLE_ONCE);
}
}
else
{
ResetStatus(session);
}
}
}
else
{
HandlePingTimeout(session);
}
}
else if (status == IdleStatus.ReaderIdle)
{
if (session.RemoveAttribute(IGNORE_READER_IDLE_ONCE) == null)
{
if (session.ContainsAttribute(WAITING_FOR_RESPONSE))
{
HandlePingTimeout(session);
}
}
}
if (_forwardEvent)
nextFilter.SessionIdle(session, status);
}
示例4: SessionIdle
/// <inheritdoc/>
public override void SessionIdle(INextFilter nextFilter, IoSession session, IdleStatus status)
{
Profile(_profileSessionIdle, _sessionIdleTimerWorker, () => nextFilter.SessionIdle(session, status));
}