C# 클래스 DotNetty.Handlers.Timeout.ReadTimeoutHandler

Raises a ReadTimeoutException when no data was read within a certain period of time.
 The connection is closed when there is no inbound traffic for 30 seconds.   var bootstrap = new DotNetty.Transport.Bootstrapping.ServerBootstrap(); bootstrap.ChildHandler(new ActionChannelInitializer(channel => { IChannelPipeline pipeline = channel.Pipeline; pipeline.AddLast("readTimeoutHandler", new ReadTimeoutHandler(30); pipeline.AddLast("myHandler", new MyHandler()); }   public class MyHandler : ChannelDuplexHandler { public override void ExceptionCaught(IChannelHandlerContext context, Exception exception) { if(exception is ReadTimeoutException) { // do somethind } else { base.ExceptionCaught(context, cause); } } }   WriteTimeoutHandler IdleStateHandler                            
상속: ChannelHandlerAdapter
파일 보기 프로젝트 열기: cdy816/mars

공개 메소드들

메소드 설명
ReadTimeoutHandler ( TimeSpan timeout ) : System

Initializes a new instance of the DotNetty.Handlers.Timeout.ReadTimeoutHandler class.

ReadTimeoutHandler ( int timeoutSeconds ) : System

Initializes a new instance of the DotNetty.Handlers.Timeout.ReadTimeoutHandler class.

보호된 메소드들

메소드 설명
ChannelIdle ( IChannelHandlerContext context, DotNetty.Handlers.Timeout.IdleStateEvent stateEvent ) : void
ReadTimedOut ( IChannelHandlerContext context ) : void

Is called when a read timeout was detected.

메소드 상세

ChannelIdle() 보호된 메소드

protected ChannelIdle ( IChannelHandlerContext context, DotNetty.Handlers.Timeout.IdleStateEvent stateEvent ) : void
context IChannelHandlerContext
stateEvent DotNetty.Handlers.Timeout.IdleStateEvent
리턴 void

ReadTimedOut() 보호된 메소드

Is called when a read timeout was detected.
protected ReadTimedOut ( IChannelHandlerContext context ) : void
context IChannelHandlerContext Context.
리턴 void

ReadTimeoutHandler() 공개 메소드

Initializes a new instance of the DotNetty.Handlers.Timeout.ReadTimeoutHandler class.
public ReadTimeoutHandler ( TimeSpan timeout ) : System
timeout TimeSpan Timeout.
리턴 System

ReadTimeoutHandler() 공개 메소드

Initializes a new instance of the DotNetty.Handlers.Timeout.ReadTimeoutHandler class.
public ReadTimeoutHandler ( int timeoutSeconds ) : System
timeoutSeconds int Timeout in seconds.
리턴 System