C# Class UnitTest.TCPSocket

Summary description for ClientSocket.
Mostra file Open project: nberardi/hMailServer Class Usage Examples

Protected Properties

Property Type Description
m_oSocket Socket

Public Methods

Method Description
CanConnect ( int iPort ) : bool
Connect ( IPAddress ipaddress, int iPort ) : bool
Connect ( int iPort ) : bool
Disconnect ( ) : void
Peek ( ) : bool
ReadUntil ( List possibleReplies ) : string
ReadUntil ( string text ) : string
Receive ( ) : string
Send ( string s ) : void
TCPSocket ( ) : System
TCPSocket ( bool useSSL ) : System
ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Private Methods

Method Description
GetHostAddress ( string hostName, bool allowIPv6 ) : IPAddress

Method Details

CanConnect() public method

public CanConnect ( int iPort ) : bool
iPort int
return bool

Connect() public method

public Connect ( IPAddress ipaddress, int iPort ) : bool
ipaddress System.Net.IPAddress
iPort int
return bool

Connect() public method

public Connect ( int iPort ) : bool
iPort int
return bool

Disconnect() public method

public Disconnect ( ) : void
return void

Peek() public method

public Peek ( ) : bool
return bool

ReadUntil() public method

public ReadUntil ( List possibleReplies ) : string
possibleReplies List
return string

ReadUntil() public method

public ReadUntil ( string text ) : string
text string
return string

Receive() public method

public Receive ( ) : string
return string

Send() public method

public Send ( string s ) : void
s string
return void

TCPSocket() public method

public TCPSocket ( ) : System
return System

TCPSocket() public method

public TCPSocket ( bool useSSL ) : System
useSSL bool
return System

ValidateServerCertificate() public static method

public static ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool
sender object
certificate System.Security.Cryptography.X509Certificates.X509Certificate
chain System.Security.Cryptography.X509Certificates.X509Chain
sslPolicyErrors SslPolicyErrors
return bool

Property Details

m_oSocket protected_oe property

protected Socket m_oSocket
return Socket