C# Class RemObjects.InternetPack.Connection

Inheritance: Stream, IDisposable, IConnectionTimeouts
Afficher le fichier Open project: remobjects/internetpack Class Usage Examples

Méthodes publiques

Свойство Type Description
CRLF Byte[]
LF Byte[]

Méthodes publiques

Méthode Description
BeginConnect ( EndPoint endPoint, AsyncCallback callback, Object state ) : IAsyncResult
BeginConnect ( IPAddress address, Int32 port, AsyncCallback callback, Object state ) : IAsyncResult
BeginRead ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
BeginReadLine ( AsyncCallback callback, Object state ) : IAsyncResult
BeginWrite ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
BufferReadLine ( ) : String
Close ( ) : void
Connect ( EndPoint endPoint ) : void
Connect ( IPAddress address, Int32 port ) : void
Connection ( Binding binding ) : System
Connection ( Socket socket ) : System
Disconnect ( ) : void
Dispose ( ) : void
EndConnect ( IAsyncResult ar ) : void
EndRead ( IAsyncResult ar ) : Int32
EndReadLine ( IAsyncResult ar ) : String
EndWrite ( IAsyncResult ar ) : void
Flush ( ) : void
Init ( Socket socket ) : void
Read ( Byte buffer, Int32 offset, Int32 size ) : Int32
ReadLine ( ) : String
Receive ( Byte buffer ) : Int32
Receive ( Byte buffer, Int32 offset, Int32 size ) : Int32
ReceiveAllRemaining ( ) : Byte[]

Get data from connection until all bytes have been read (i.e., until Receive() returns 0). Uses a constant buffersize.

ReceiveAllRemaining ( Int32 bufferSize ) : Byte[]

Get data from connection until all bytes have been read (i.e., until Receive() returns 0). Uses a buffersize passed as a parameter.

ReceiveToStream ( Stream stream ) : void
ReceiveToStream ( Stream stream, System.Int64 size ) : void
ReceiveToStream ( Stream stream, System.Int64 size, Int32 bufferSize ) : void
ReceiveWhatsAvailable ( Byte buffer, Int32 offset, Int32 size ) : Int32
ResetStatistics ( ) : void
Seek ( System.Int64 offset, SeekOrigin origin ) : System.Int64
Send ( Byte buffer ) : Int32
Send ( Byte buffer, Int32 offset, Int32 size ) : Int32
SendFromStream ( Stream stream ) : void
SendFromStream ( Stream stream, System.Int64 size ) : void
SendFromStream ( Stream stream, System.Int64 size, Int32 bufferSize ) : void
SetLength ( System.Int64 length ) : void
SkipBytes ( Int32 size ) : void
ToString ( ) : String
Write ( Byte buffer, Int32 offset, Int32 size ) : void
WriteLine ( String line ) : void
WriteLineLF ( String line ) : void

Méthodes protégées

Méthode Description
BeginInitializeServerConnection ( AsyncCallback callback, Object state ) : IAsyncResult
DataSocketClose ( ) : void
DataSocketClose ( System.Boolean dispose ) : void
DataSocketConnect ( EndPoint endPoint ) : void
DataSocketReceiveWhatsAvaiable ( Byte buffer, Int32 offset, Int32 size ) : Int32
DataSocketSend ( Byte buffer ) : Int32
DataSocketSendAsMuchAsPossible ( Byte buffer, Int32 offset, Int32 size ) : Int32
EndInitializeServerConnection ( IAsyncResult ar ) : void
InitializeServerConnection ( ) : void
IntBeginRead ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
IntBeginWrite ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
IntEndRead ( IAsyncResult ar ) : Int32
IntEndWrite ( IAsyncResult ar ) : void
StartTimeoutTimer ( ) : void
StopTimeoutTimer ( ) : void
TriggerAsyncDisconnect ( ) : void
TriggerAsyncHaveIncompleteData ( ) : void
TriggerOnBytesReceived ( System.Int64 count ) : void
TriggerOnBytesSent ( System.Int64 count ) : void

Private Methods

Méthode Description
Abort ( ) : void
DataSocketReceive ( Byte buffer, Int32 offset, Int32 size ) : Int32
DataSocketSend ( Byte buffer, Int32 offset, Int32 size ) : Int32
Init ( Binding binding ) : void
IntReadCallback ( IAsyncResult ar ) : void
IntReadLineCallback ( IAsyncResult ar ) : void
Receive ( Byte buffer, Int32 offset, Int32 size, System.Boolean block ) : Int32
SetDefaultValues ( ) : void
TimeoutElapsed ( Object sender ) : void

Method Details

BeginConnect() public méthode

public BeginConnect ( EndPoint endPoint, AsyncCallback callback, Object state ) : IAsyncResult
endPoint System.Net.EndPoint
callback AsyncCallback
state Object
Résultat IAsyncResult

BeginConnect() public méthode

public BeginConnect ( IPAddress address, Int32 port, AsyncCallback callback, Object state ) : IAsyncResult
address System.Net.IPAddress
port System.Int32
callback AsyncCallback
state Object
Résultat IAsyncResult

BeginInitializeServerConnection() protected méthode

protected BeginInitializeServerConnection ( AsyncCallback callback, Object state ) : IAsyncResult
callback AsyncCallback
state Object
Résultat IAsyncResult

BeginRead() public méthode

public BeginRead ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
buffer Byte
offset System.Int32
count System.Int32
callback AsyncCallback
state Object
Résultat IAsyncResult

BeginReadLine() public méthode

public BeginReadLine ( AsyncCallback callback, Object state ) : IAsyncResult
callback AsyncCallback
state Object
Résultat IAsyncResult

BeginWrite() public méthode

public BeginWrite ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
buffer Byte
offset System.Int32
count System.Int32
callback AsyncCallback
state Object
Résultat IAsyncResult

BufferReadLine() public méthode

public BufferReadLine ( ) : String
Résultat String

Close() public méthode

public Close ( ) : void
Résultat void

Connect() public méthode

public Connect ( EndPoint endPoint ) : void
endPoint System.Net.EndPoint
Résultat void

Connect() public méthode

public Connect ( IPAddress address, Int32 port ) : void
address System.Net.IPAddress
port System.Int32
Résultat void

Connection() public méthode

public Connection ( Binding binding ) : System
binding Binding
Résultat System

Connection() public méthode

public Connection ( Socket socket ) : System
socket Socket
Résultat System

DataSocketClose() protected méthode

protected DataSocketClose ( ) : void
Résultat void

DataSocketClose() protected méthode

protected DataSocketClose ( System.Boolean dispose ) : void
dispose System.Boolean
Résultat void

DataSocketConnect() protected méthode

protected DataSocketConnect ( EndPoint endPoint ) : void
endPoint System.Net.EndPoint
Résultat void

DataSocketReceiveWhatsAvaiable() protected méthode

protected DataSocketReceiveWhatsAvaiable ( Byte buffer, Int32 offset, Int32 size ) : Int32
buffer Byte
offset System.Int32
size System.Int32
Résultat System.Int32

DataSocketSend() protected méthode

protected DataSocketSend ( Byte buffer ) : Int32
buffer Byte
Résultat System.Int32

DataSocketSendAsMuchAsPossible() protected méthode

protected DataSocketSendAsMuchAsPossible ( Byte buffer, Int32 offset, Int32 size ) : Int32
buffer Byte
offset System.Int32
size System.Int32
Résultat System.Int32

Disconnect() public méthode

public Disconnect ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

EndConnect() public méthode

public EndConnect ( IAsyncResult ar ) : void
ar IAsyncResult
Résultat void

EndInitializeServerConnection() protected méthode

protected EndInitializeServerConnection ( IAsyncResult ar ) : void
ar IAsyncResult
Résultat void

EndRead() public méthode

public EndRead ( IAsyncResult ar ) : Int32
ar IAsyncResult
Résultat System.Int32

EndReadLine() public méthode

public EndReadLine ( IAsyncResult ar ) : String
ar IAsyncResult
Résultat String

EndWrite() public méthode

public EndWrite ( IAsyncResult ar ) : void
ar IAsyncResult
Résultat void

Flush() public méthode

public Flush ( ) : void
Résultat void

Init() public méthode

public Init ( Socket socket ) : void
socket Socket
Résultat void

InitializeServerConnection() protected méthode

protected InitializeServerConnection ( ) : void
Résultat void

IntBeginRead() protected méthode

protected IntBeginRead ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
buffer Byte
offset System.Int32
count System.Int32
callback AsyncCallback
state Object
Résultat IAsyncResult

IntBeginWrite() protected méthode

protected IntBeginWrite ( Byte buffer, Int32 offset, Int32 count, AsyncCallback callback, Object state ) : IAsyncResult
buffer Byte
offset System.Int32
count System.Int32
callback AsyncCallback
state Object
Résultat IAsyncResult

IntEndRead() protected méthode

protected IntEndRead ( IAsyncResult ar ) : Int32
ar IAsyncResult
Résultat System.Int32

IntEndWrite() protected méthode

protected IntEndWrite ( IAsyncResult ar ) : void
ar IAsyncResult
Résultat void

Read() public méthode

public Read ( Byte buffer, Int32 offset, Int32 size ) : Int32
buffer Byte
offset System.Int32
size System.Int32
Résultat System.Int32

ReadLine() public méthode

public ReadLine ( ) : String
Résultat String

Receive() public méthode

public Receive ( Byte buffer ) : Int32
buffer Byte
Résultat System.Int32

Receive() public méthode

public Receive ( Byte buffer, Int32 offset, Int32 size ) : Int32
buffer Byte
offset System.Int32
size System.Int32
Résultat System.Int32

ReceiveAllRemaining() public méthode

Get data from connection until all bytes have been read (i.e., until Receive() returns 0). Uses a constant buffersize.
public ReceiveAllRemaining ( ) : Byte[]
Résultat Byte[]

ReceiveAllRemaining() public méthode

Get data from connection until all bytes have been read (i.e., until Receive() returns 0). Uses a buffersize passed as a parameter.
public ReceiveAllRemaining ( Int32 bufferSize ) : Byte[]
bufferSize System.Int32 Size of receive buffer used for each pass
Résultat Byte[]

ReceiveToStream() public méthode

public ReceiveToStream ( Stream stream ) : void
stream Stream
Résultat void

ReceiveToStream() public méthode

public ReceiveToStream ( Stream stream, System.Int64 size ) : void
stream Stream
size System.Int64
Résultat void

ReceiveToStream() public méthode

public ReceiveToStream ( Stream stream, System.Int64 size, Int32 bufferSize ) : void
stream Stream
size System.Int64
bufferSize System.Int32
Résultat void

ReceiveWhatsAvailable() public méthode

public ReceiveWhatsAvailable ( Byte buffer, Int32 offset, Int32 size ) : Int32
buffer Byte
offset System.Int32
size System.Int32
Résultat System.Int32

ResetStatistics() public méthode

public ResetStatistics ( ) : void
Résultat void

Seek() public méthode

public Seek ( System.Int64 offset, SeekOrigin origin ) : System.Int64
offset System.Int64
origin SeekOrigin
Résultat System.Int64

Send() public méthode

public Send ( Byte buffer ) : Int32
buffer Byte
Résultat System.Int32

Send() public méthode

public Send ( Byte buffer, Int32 offset, Int32 size ) : Int32
buffer Byte
offset System.Int32
size System.Int32
Résultat System.Int32

SendFromStream() public méthode

public SendFromStream ( Stream stream ) : void
stream Stream
Résultat void

SendFromStream() public méthode

public SendFromStream ( Stream stream, System.Int64 size ) : void
stream Stream
size System.Int64
Résultat void

SendFromStream() public méthode

public SendFromStream ( Stream stream, System.Int64 size, Int32 bufferSize ) : void
stream Stream
size System.Int64
bufferSize System.Int32
Résultat void

SetLength() public méthode

public SetLength ( System.Int64 length ) : void
length System.Int64
Résultat void

SkipBytes() public méthode

public SkipBytes ( Int32 size ) : void
size System.Int32
Résultat void

StartTimeoutTimer() protected méthode

protected StartTimeoutTimer ( ) : void
Résultat void

StopTimeoutTimer() protected méthode

protected StopTimeoutTimer ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : String
Résultat String

TriggerAsyncDisconnect() protected méthode

protected TriggerAsyncDisconnect ( ) : void
Résultat void

TriggerAsyncHaveIncompleteData() protected méthode

protected TriggerAsyncHaveIncompleteData ( ) : void
Résultat void

TriggerOnBytesReceived() protected méthode

protected TriggerOnBytesReceived ( System.Int64 count ) : void
count System.Int64
Résultat void

TriggerOnBytesSent() protected méthode

protected TriggerOnBytesSent ( System.Int64 count ) : void
count System.Int64
Résultat void

Write() public méthode

public Write ( Byte buffer, Int32 offset, Int32 size ) : void
buffer Byte
offset System.Int32
size System.Int32
Résultat void

WriteLine() public méthode

public WriteLine ( String line ) : void
line String
Résultat void

WriteLineLF() public méthode

public WriteLineLF ( String line ) : void
line String
Résultat void

Property Details

CRLF public_oe property

public Byte[] CRLF
Résultat Byte[]

LF public_oe property

public Byte[] LF
Résultat Byte[]