C# Класс org.GraphDefined.Vanaheimr.Hermod.Sockets.TCP.TCPClient

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
_ConnectionTimeout System.TimeSpan

Открытые методы

Метод Описание
Connect ( ) : TCPConnectResult
Disconnect ( ) : TCPDisconnectResult
TCPClient ( String RemoteHost, IPPort RemotePort, System.Boolean UseIPv4 = true, System.Boolean UseIPv6 = false, System.Boolean PreferIPv6 = false, TLSUsage UseTLS = TLSUsage.STARTTLS, ValidateRemoteCertificateDelegate ValidateServerCertificate = null, System.TimeSpan ConnectionTimeout = null, DNSClient DNSClient = null, System.Boolean AutoConnect = false, CancellationToken CancellationToken = null ) : System

TCPClient ( String DNSName = "", String ServiceName = "", System.Boolean UseIPv4 = true, System.Boolean UseIPv6 = false, System.Boolean PreferIPv6 = false, System.Boolean UseTLS = false, System.TimeSpan ConnectionTimeout = null, DNSClient DNSClient = null, System.Boolean AutoConnect = false ) : System

Create a new TCPClient connecting to a remote service using DNS SRV records.

Защищенные методы

Метод Описание
EnableTLS ( ) : void

Приватные методы

Метод Описание
CreateAndConnectTCPSocket ( IIPAddress _IPAddress, IPPort Port ) : Socket
QueryDNS ( ) : void
Reconnect ( ) : System.Boolean
_ValidateRemoteCertificate ( Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors ) : System.Boolean

Описание методов

Connect() публичный Метод

public Connect ( ) : TCPConnectResult
Результат TCPConnectResult

Disconnect() публичный Метод

public Disconnect ( ) : TCPDisconnectResult
Результат TCPDisconnectResult

EnableTLS() защищенный Метод

protected EnableTLS ( ) : void
Результат void

TCPClient() публичный Метод

public TCPClient ( String RemoteHost, IPPort RemotePort, System.Boolean UseIPv4 = true, System.Boolean UseIPv6 = false, System.Boolean PreferIPv6 = false, TLSUsage UseTLS = TLSUsage.STARTTLS, ValidateRemoteCertificateDelegate ValidateServerCertificate = null, System.TimeSpan ConnectionTimeout = null, DNSClient DNSClient = null, System.Boolean AutoConnect = false, CancellationToken CancellationToken = null ) : System
RemoteHost String
RemotePort IPPort
UseIPv4 System.Boolean Whether to use IPv4 as networking protocol.
UseIPv6 System.Boolean Whether to use IPv6 as networking protocol.
PreferIPv6 System.Boolean Prefer IPv6 (instead of IPv4) as networking protocol.
UseTLS TLSUsage Whether Transport Layer Security should be used or not.
ValidateServerCertificate ValidateRemoteCertificateDelegate A callback for validating the remote server certificate.
ConnectionTimeout System.TimeSpan The timeout connecting to the remote service.
DNSClient DNSClient An optional DNS client used to resolve DNS names.
AutoConnect System.Boolean Connect to the TCP service automatically on startup. Default is false.
CancellationToken System.Threading.CancellationToken
Результат System

TCPClient() публичный Метод

Create a new TCPClient connecting to a remote service using DNS SRV records.
public TCPClient ( String DNSName = "", String ServiceName = "", System.Boolean UseIPv4 = true, System.Boolean UseIPv6 = false, System.Boolean PreferIPv6 = false, System.Boolean UseTLS = false, System.TimeSpan ConnectionTimeout = null, DNSClient DNSClient = null, System.Boolean AutoConnect = false ) : System
DNSName String The optional DNS name of the remote service to connect to.
ServiceName String The optional DNS SRV service name of the remote service to connect to.
UseIPv4 System.Boolean Whether to use IPv4 as networking protocol.
UseIPv6 System.Boolean Whether to use IPv6 as networking protocol.
PreferIPv6 System.Boolean Prefer IPv6 (instead of IPv4) as networking protocol.
UseTLS System.Boolean
ConnectionTimeout System.TimeSpan The timeout connecting to the remote service.
DNSClient DNSClient An optional DNS client used to resolve DNS names.
AutoConnect System.Boolean Connect to the TCP service automatically on startup. Default is false.
Результат System

Описание свойств

_ConnectionTimeout публичное свойство

public TimeSpan,System _ConnectionTimeout
Результат System.TimeSpan