C# 클래스 Helios.Reactor.ReactorBase

상속: IReactor
파일 보기 프로젝트 열기: helios-io/helios 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
Listener Socket

공개 메소드들

메소드 설명
CheckWasDisposed ( ) : void
Configure ( IConnectionConfig config ) : void
Dispose ( ) : void
Dispose ( bool disposing ) : void
Send ( NetworkData data ) : void
Send ( byte buffer, int index, int length, INode destination ) : void
Start ( ) : void
Stop ( ) : void

보호된 메소드들

메소드 설명
CreateNetworkState ( Socket socket, INode remotehost ) : NetworkState
CreateNetworkState ( Socket socket, INode remotehost, IByteBuf buffer, int bufferSize ) : NetworkState
NodeConnected ( INode node, IConnection responseChannel ) : void

Invoked when a new node has connected to this server

NodeDisconnected ( HeliosConnectionException reason, IConnection closedChannel ) : void

Invoked when a node's connection to this server has been disconnected

OnErrorIfNotNull ( Exception reason, IConnection connection ) : void
ReactorBase ( IPAddress localAddress, int localPort, NetworkEventLoop eventLoop, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, SocketType socketType = SocketType.Stream, ProtocolType protocol = ProtocolType.Tcp, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
ReceivedData ( NetworkData availableData, ReactorResponseChannel responseChannel ) : void

Abstract method to be filled in by a child class - data received from the network is injected into this method via the NetworkData data type.

StartInternal ( ) : void
StopInternal ( ) : void

비공개 메소드들

메소드 설명
CloseConnection ( Exception reason, IConnection remoteHost ) : void
CloseConnection ( IConnection remoteHost ) : void

Closes a connection to a remote host (without shutting down the server.)

메소드 상세

CheckWasDisposed() 공개 메소드

public CheckWasDisposed ( ) : void
리턴 void

Configure() 공개 추상적인 메소드

public abstract Configure ( IConnectionConfig config ) : void
config IConnectionConfig
리턴 void

CreateNetworkState() 보호된 메소드

protected CreateNetworkState ( Socket socket, INode remotehost ) : NetworkState
socket Socket
remotehost INode
리턴 Helios.Net.NetworkState

CreateNetworkState() 보호된 메소드

protected CreateNetworkState ( Socket socket, INode remotehost, IByteBuf buffer, int bufferSize ) : NetworkState
socket Socket
remotehost INode
buffer IByteBuf
bufferSize int
리턴 Helios.Net.NetworkState

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

Dispose() 공개 추상적인 메소드

public abstract Dispose ( bool disposing ) : void
disposing bool
리턴 void

NodeConnected() 보호된 메소드

Invoked when a new node has connected to this server
protected NodeConnected ( INode node, IConnection responseChannel ) : void
node INode The instance that just connected
responseChannel IConnection The channel that the server can respond to
리턴 void

NodeDisconnected() 보호된 메소드

Invoked when a node's connection to this server has been disconnected
protected NodeDisconnected ( HeliosConnectionException reason, IConnection closedChannel ) : void
reason Helios.Exceptions.HeliosConnectionException The reason why this node disconnected
closedChannel IConnection The instance that just closed
리턴 void

OnErrorIfNotNull() 보호된 메소드

protected OnErrorIfNotNull ( Exception reason, IConnection connection ) : void
reason System.Exception
connection IConnection
리턴 void

ReactorBase() 보호된 메소드

protected ReactorBase ( IPAddress localAddress, int localPort, NetworkEventLoop eventLoop, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, SocketType socketType = SocketType.Stream, ProtocolType protocol = ProtocolType.Tcp, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
localAddress System.Net.IPAddress
localPort int
eventLoop Helios.Net.NetworkEventLoop
encoder IMessageEncoder
decoder IMessageDecoder
allocator IByteBufAllocator
socketType SocketType
protocol ProtocolType
bufferSize int
리턴 System

ReceivedData() 보호된 메소드

Abstract method to be filled in by a child class - data received from the network is injected into this method via the NetworkData data type.
protected ReceivedData ( NetworkData availableData, ReactorResponseChannel responseChannel ) : void
availableData Helios.Net.NetworkData Data available from the network, including a response address
responseChannel Helios.Reactor.Response.ReactorResponseChannel Available channel for handling network response
리턴 void

Send() 공개 메소드

public Send ( NetworkData data ) : void
data Helios.Net.NetworkData
리턴 void

Send() 공개 추상적인 메소드

public abstract Send ( byte buffer, int index, int length, INode destination ) : void
buffer byte
index int
length int
destination INode
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

StartInternal() 보호된 추상적인 메소드

protected abstract StartInternal ( ) : void
리턴 void

Stop() 공개 메소드

public Stop ( ) : void
리턴 void

StopInternal() 보호된 추상적인 메소드

protected abstract StopInternal ( ) : void
리턴 void

프로퍼티 상세

Listener 보호되어 있는 프로퍼티

protected Socket Listener
리턴 Socket