C# Class System.Data.SqlClient.SNI.SNITCPHandle

TCP connection handle
Inheritance: System.Data.SqlClient.SNI.SNIHandle
Show file Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
CheckConnection ( ) : uint

Check SNI handle connection

DisableSsl ( ) : void

Disable SSL

Dispose ( ) : void

Dispose object

EnableSsl ( uint options ) : uint

Enable SSL

KillConnection ( ) : void

Test handle for killing underlying connection

Receive ( SNIPacket &packet, int timeoutInMilliseconds ) : uint

Receive a packet synchronously

ReceiveAsync ( SNIPacket &packet ) : uint

Receive a packet asynchronously

SNITCPHandle ( string serverName, int port, long timerExpire, object callbackObject, bool parallel ) : System.IO

Constructor

Send ( SNIPacket packet ) : uint

Send a packet synchronously

SendAsync ( SNIPacket packet, SNIAsyncCallback callback = null ) : uint

Send a packet asynchronously

SetAsyncCallbacks ( SNIAsyncCallback receiveCallback, SNIAsyncCallback sendCallback ) : void

Set async callbacks

SetBufferSize ( int bufferSize ) : void

Set buffer size

Private Methods

Method Description
ConnectAsync ( IPAddress serverAddresses, int port ) : Task
ConnectAsync ( string serverName, int port ) : Task
ReportErrorAndReleasePacket ( SNIPacket packet, Exception sniException ) : uint
ReportErrorAndReleasePacket ( SNIPacket packet, uint nativeError, uint sniError, string errorMessage ) : uint
ReportTcpSNIError ( Exception sniException ) : uint
ReportTcpSNIError ( uint nativeError, uint sniError, string errorMessage ) : uint
ValidateServerCertificate ( object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors policyErrors ) : bool

Validate server certificate callback

Method Details

CheckConnection() public method

Check SNI handle connection
public CheckConnection ( ) : uint
return uint

DisableSsl() public method

Disable SSL
public DisableSsl ( ) : void
return void

Dispose() public method

Dispose object
public Dispose ( ) : void
return void

EnableSsl() public method

Enable SSL
public EnableSsl ( uint options ) : uint
options uint
return uint

KillConnection() public method

Test handle for killing underlying connection
public KillConnection ( ) : void
return void

Receive() public method

Receive a packet synchronously
public Receive ( SNIPacket &packet, int timeoutInMilliseconds ) : uint
packet SNIPacket SNI packet
timeoutInMilliseconds int Timeout in Milliseconds
return uint

ReceiveAsync() public method

Receive a packet asynchronously
public ReceiveAsync ( SNIPacket &packet ) : uint
packet SNIPacket SNI packet
return uint

SNITCPHandle() public method

Constructor
public SNITCPHandle ( string serverName, int port, long timerExpire, object callbackObject, bool parallel ) : System.IO
serverName string Server name
port int TCP port number
timerExpire long Connection timer expiration
callbackObject object Callback object
parallel bool
return System.IO

Send() public method

Send a packet synchronously
public Send ( SNIPacket packet ) : uint
packet SNIPacket SNI packet
return uint

SendAsync() public method

Send a packet asynchronously
public SendAsync ( SNIPacket packet, SNIAsyncCallback callback = null ) : uint
packet SNIPacket SNI packet
callback SNIAsyncCallback Completion callback
return uint

SetAsyncCallbacks() public method

Set async callbacks
public SetAsyncCallbacks ( SNIAsyncCallback receiveCallback, SNIAsyncCallback sendCallback ) : void
receiveCallback SNIAsyncCallback Receive callback
sendCallback SNIAsyncCallback Send callback
return void

SetBufferSize() public method

Set buffer size
public SetBufferSize ( int bufferSize ) : void
bufferSize int Buffer size
return void