C# Class Helios.Net.Connections.UnstreamedConnectionBase

Inheritance: IConnection
Exibir arquivo Open project: helios-io/helios

Private Properties

Property Type Description

Public Methods

Method Description
BeginReceive ( ) : void
BeginReceive ( ReceivedDataCallback callback ) : void
Close ( ) : void
Close ( Exception reason ) : void
Configure ( IConnectionConfig config ) : void
Dispose ( ) : void
InvokeReceiveIfNotNull ( NetworkData data ) : void
IsOpen ( ) : bool
Open ( ) : void
OpenAsync ( ) : Task
Send ( NetworkData data ) : void
Send ( byte buffer, int index, int length, INode destination ) : void
StopReceive ( ) : void
ToString ( ) : string

Protected Methods

Method Description
BeginReceiveInternal ( ) : void
CheckWasDisposed ( ) : void

Prevents disposed connections from being re-used again

CreateNetworkState ( Socket socket, INode remotehost ) : NetworkState
CreateNetworkState ( Socket socket, INode remotehost, IByteBuf buffer, int bufferSize ) : NetworkState
Dispose ( bool disposing ) : void
InvokeConnectIfNotNull ( INode remoteHost ) : void
InvokeDisconnectIfNotNull ( INode remoteHost, HeliosConnectionException ex ) : void
InvokeErrorIfNotNull ( Exception ex ) : void
ReceiveCallback ( IAsyncResult ar ) : void
SendInternal ( byte buffer, int index, int length, INode destination ) : void
UnstreamedConnectionBase ( NetworkEventLoop eventLoop, INode binding, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
UnstreamedConnectionBase ( NetworkEventLoop eventLoop, INode binding, System.TimeSpan timeout, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
UnstreamedConnectionBase ( int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System

Method Details

BeginReceive() public method

public BeginReceive ( ) : void
return void

BeginReceive() public method

public BeginReceive ( ReceivedDataCallback callback ) : void
callback ReceivedDataCallback
return void

BeginReceiveInternal() protected abstract method

protected abstract BeginReceiveInternal ( ) : void
return void

CheckWasDisposed() protected method

Prevents disposed connections from being re-used again
protected CheckWasDisposed ( ) : void
return void

Close() public abstract method

public abstract Close ( ) : void
return void

Close() public abstract method

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

Configure() public abstract method

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

CreateNetworkState() protected method

protected CreateNetworkState ( Socket socket, INode remotehost ) : NetworkState
socket Socket
remotehost INode
return NetworkState

CreateNetworkState() protected method

protected CreateNetworkState ( Socket socket, INode remotehost, IByteBuf buffer, int bufferSize ) : NetworkState
socket Socket
remotehost INode
buffer IByteBuf
bufferSize int
return NetworkState

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected abstract method

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

InvokeConnectIfNotNull() protected method

protected InvokeConnectIfNotNull ( INode remoteHost ) : void
remoteHost INode
return void

InvokeDisconnectIfNotNull() protected method

protected InvokeDisconnectIfNotNull ( INode remoteHost, HeliosConnectionException ex ) : void
remoteHost INode
ex Helios.Exceptions.HeliosConnectionException
return void

InvokeErrorIfNotNull() protected method

protected InvokeErrorIfNotNull ( Exception ex ) : void
ex System.Exception
return void

InvokeReceiveIfNotNull() public method

public InvokeReceiveIfNotNull ( NetworkData data ) : void
data NetworkData
return void

IsOpen() public abstract method

public abstract IsOpen ( ) : bool
return bool

Open() public abstract method

public abstract Open ( ) : void
return void

OpenAsync() public abstract method

public abstract OpenAsync ( ) : Task
return Task

ReceiveCallback() protected method

protected ReceiveCallback ( IAsyncResult ar ) : void
ar IAsyncResult
return void

Send() public method

public Send ( NetworkData data ) : void
data NetworkData
return void

Send() public method

public Send ( byte buffer, int index, int length, INode destination ) : void
buffer byte
index int
length int
destination INode
return void

SendInternal() protected abstract method

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

StopReceive() public method

public StopReceive ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string

UnstreamedConnectionBase() protected method

protected UnstreamedConnectionBase ( NetworkEventLoop eventLoop, INode binding, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
eventLoop NetworkEventLoop
binding INode
encoder IMessageEncoder
decoder IMessageDecoder
allocator IByteBufAllocator
bufferSize int
return System

UnstreamedConnectionBase() protected method

protected UnstreamedConnectionBase ( NetworkEventLoop eventLoop, INode binding, System.TimeSpan timeout, IMessageEncoder encoder, IMessageDecoder decoder, IByteBufAllocator allocator, int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
eventLoop NetworkEventLoop
binding INode
timeout System.TimeSpan
encoder IMessageEncoder
decoder IMessageDecoder
allocator IByteBufAllocator
bufferSize int
return System

UnstreamedConnectionBase() protected method

protected UnstreamedConnectionBase ( int bufferSize = NetworkConstants.DEFAULT_BUFFER_SIZE ) : System
bufferSize int
return System