Class SocketTransport
Abstract socket implementation of transport.
Inheritance
System.Object
SocketTransport
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: FixAntenna.Core.dll
Syntax
public abstract class SocketTransport : ITransport
Constructors
SocketTransport()
Declaration
Fields
Is
Declaration
Field Value
Type |
Description |
System.IO.Stream |
|
Log
Declaration
protected readonly ILog Log
Field Value
Os
Declaration
Field Value
Type |
Description |
System.IO.Stream |
|
ReceiveBufferSize
Declaration
protected int ReceiveBufferSize
Field Value
Type |
Description |
System.Int32 |
|
SendBufferSize
Declaration
protected int SendBufferSize
Field Value
Type |
Description |
System.Int32 |
|
Socket
Declaration
Field Value
Type |
Description |
System.Net.Sockets.Socket |
|
SocketReadSize
Declaration
public const int SocketReadSize = 32768
Field Value
Type |
Description |
System.Int32 |
|
Properties
IsBlockingSocket
Declaration
public virtual bool IsBlockingSocket { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsOpen
Returns true if transport is open.
Declaration
public virtual bool IsOpen { get; }
Property Value
Type |
Description |
System.Boolean |
|
IsSecured
Returns true, if connected through secured connection.
Declaration
public virtual bool IsSecured { get; }
Property Value
Type |
Description |
System.Boolean |
|
LocalEndPoint
Gets local IPEndPint after the transport connected.
Declaration
public IPEndPoint LocalEndPoint { get; }
Property Value
Type |
Description |
System.Net.IPEndPoint |
|
RemoteEndPoint
Gets the remote IPEndPoint after the transport connected.
Declaration
public IPEndPoint RemoteEndPoint { get; }
Property Value
Type |
Description |
System.Net.IPEndPoint |
|
Methods
Close()
Declaration
public virtual void Close()
Exceptions
Type |
Condition |
System.IO.IOException |
|
Open()
Declaration
public abstract void Open()
Exceptions
Type |
Condition |
System.IO.IOException |
|
Read(ByteBuffer)
Declaration
public virtual int Read(ByteBuffer buffer)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Read(ByteBuffer, Int32, Int32)
Declaration
public virtual int Read(ByteBuffer buffer, int offset, int length)
Parameters
Type |
Name |
Description |
ByteBuffer |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Int32 |
|
Read(Byte[])
Transport dependent read method.
Declaration
public virtual int Read(byte[] buffer)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
holder for read bytes
|
Returns
Type |
Description |
System.Int32 |
number of byte actually read
|
Exceptions
Type |
Condition |
System.IO.IOException |
if unable to read
|
Read(Byte[], Int32, Int32)
Transport dependent read method.
Declaration
public virtual int Read(byte[] buffer, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
holder for read bytes
|
System.Int32 |
offset |
in buffer
|
System.Int32 |
length |
maximum bytes to be read
|
Returns
Type |
Description |
System.Int32 |
number of byte actually read
|
Exceptions
Type |
Condition |
System.IO.IOException |
if unable to read
|
WaitUntilReadyToWrite()
Declaration
public virtual void WaitUntilReadyToWrite()
Write(ByteBuffer)
Declaration
public virtual int Write(ByteBuffer buffer)
Parameters
Returns
Type |
Description |
System.Int32 |
|
Write(ByteBuffer, Int32, Int32)
Declaration
public virtual int Write(ByteBuffer buffer, int offset, int length)
Parameters
Type |
Name |
Description |
ByteBuffer |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
length |
|
Returns
Type |
Description |
System.Int32 |
|
Write(Byte[])
Transport dependent write method.
Declaration
public virtual void Write(byte[] message)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
actual message
|
Exceptions
Type |
Condition |
System.IO.IOException |
if unable to write
|
Write(Byte[], Int32, Int32)
Transport dependent write method.
Declaration
public virtual int Write(byte[] message, int offset, int length)
Parameters
Type |
Name |
Description |
System.Byte[] |
message |
actual message
|
System.Int32 |
offset |
the offset in buffer
|
System.Int32 |
length |
the num of bytes to write
|
Returns
Type |
Description |
System.Int32 |
|
Exceptions
Type |
Condition |
System.IO.IOException |
if unable to write
|
Implements