C# Class Helios.Net.Connections.TcpConnection

Inheritance: UnstreamedConnectionBase
Mostrar archivo Open project: helios-io/helios

Protected Properties

Property Type Description
_client Socket

Public Methods

Method Description
Close ( ) : void
Close ( Exception reason ) : void
Configure ( IConnectionConfig config ) : void
IsOpen ( ) : bool
Open ( ) : void
OpenAsync ( ) : Task
TcpConnection ( NetworkEventLoop eventLoop, INode node, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
TcpConnection ( NetworkEventLoop eventLoop, INode node, System.TimeSpan timeout, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
TcpConnection ( Socket client, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
TcpConnection ( Socket client, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System

Protected Methods

Method Description
BeginReceiveInternal ( ) : void
Dispose ( bool disposing ) : void
SendInternal ( byte buffer, int index, int length, INode destination ) : void
SetLocal ( Socket client ) : void

After a TCP connection is successfully established, set the value of the local node to whatever port / IP was assigned.

Private Methods

Method Description
InitClient ( ) : void
InitClient ( Socket client ) : void

Method Details

BeginReceiveInternal() protected method

protected BeginReceiveInternal ( ) : void
return void

Close() public method

public Close ( ) : void
return void

Close() public method

public Close ( Exception reason ) : void
reason System.Exception
return void

Configure() public method

public Configure ( IConnectionConfig config ) : void
config IConnectionConfig
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

IsOpen() public method

public IsOpen ( ) : bool
return bool

Open() public method

public Open ( ) : void
return void

OpenAsync() public method

public OpenAsync ( ) : Task
return Task

SendInternal() protected method

protected SendInternal ( byte buffer, int index, int length, INode destination ) : void
buffer byte
index int
length int
destination INode
return void

SetLocal() protected method

After a TCP connection is successfully established, set the value of the local node to whatever port / IP was assigned.
protected SetLocal ( Socket client ) : void
client Socket
return void

TcpConnection() public method

public TcpConnection ( NetworkEventLoop eventLoop, INode node, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
eventLoop NetworkEventLoop
node INode
encoder IMessageEncoder
decoder IMessageDecoder
allocator IByteBufAllocator
bufferSize int
return System

TcpConnection() public method

public TcpConnection ( NetworkEventLoop eventLoop, INode node, System.TimeSpan timeout, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
eventLoop NetworkEventLoop
node INode
timeout System.TimeSpan
encoder IMessageEncoder
decoder IMessageDecoder
allocator IByteBufAllocator
bufferSize int
return System

TcpConnection() public method

public TcpConnection ( Socket client, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
client Socket
encoder IMessageEncoder
decoder IMessageDecoder
allocator IByteBufAllocator
bufferSize int
return System

TcpConnection() public method

public TcpConnection ( Socket client, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
client Socket
bufferSize int
return System

Property Details

_client protected_oe property

protected Socket _client
return Socket