C# 클래스 GSF.Communication.Transport

Defines helper methods related to IP socket based communications.
파일 보기 프로젝트 열기: GridProtectionAlliance/gsf 1 사용 예제들

공개 메소드들

메소드 설명
CreateEndPoint ( string hostNameOrAddress, int port, IPStack stack ) : IPEndPoint

Creates an IPEndPoint for the specified host name and port number.

CreateSocket ( string address, int port, ProtocolType protocol, IPStack stack, bool allowDualStackSocket = true ) : Socket

Creates a Socket for the specified port and protocol.

GetDefaultIPStack ( ) : IPStack

Gets the default IP stack for this system.

GetInterfaceIPStack ( string>.Dictionary connectionStringEntries ) : IPStack

Derives the desired IPStack from the "interface" setting in the connection string key/value pairs.

The "interface" setting will be added to the connectionStringEntries if it doesn't exist, in this case return value will be IPStack.Default.

IsDestinationReachable ( IPEndPoint targetIPEndPoint ) : bool

Determines if the specified UDP destination is listening for data.

IsIPv6IP ( string ipAddress ) : bool

Determines if the specified ipAddress is an IPv6 IP.

IsLocalAddress ( string hostNameOrAddress ) : bool

Determines if an IP address (or DNS name) is a local IP address.

IsMulticastIP ( IPAddress ipAddress ) : bool

Determines if the specified ipAddress is a multicast IP.

IsPortNumberValid ( string port ) : bool

Determines whether the specified port is valid.

메소드 상세

CreateEndPoint() 공개 정적인 메소드

Creates an IPEndPoint for the specified host name and port number.
public static CreateEndPoint ( string hostNameOrAddress, int port, IPStack stack ) : IPEndPoint
hostNameOrAddress string The host name or IP address to resolve.
port int The port number to be associated with the address.
stack IPStack Desired IP stack to use.
리턴 System.Net.IPEndPoint

CreateSocket() 공개 정적인 메소드

Creates a Socket for the specified port and protocol.
public static CreateSocket ( string address, int port, ProtocolType protocol, IPStack stack, bool allowDualStackSocket = true ) : Socket
address string The local address where the will be bound.
port int The port number at which the will be bound.
protocol ProtocolType One of the values.
stack IPStack Desired IP stack to use.
allowDualStackSocket bool Determines if dual-mode socket is allowed when endpoint address is IPv6.
리턴 Socket

GetDefaultIPStack() 공개 정적인 메소드

Gets the default IP stack for this system.
public static GetDefaultIPStack ( ) : IPStack
리턴 IPStack

GetInterfaceIPStack() 공개 정적인 메소드

Derives the desired IPStack from the "interface" setting in the connection string key/value pairs.
The "interface" setting will be added to the connectionStringEntries if it doesn't exist, in this case return value will be IPStack.Default.
public static GetInterfaceIPStack ( string>.Dictionary connectionStringEntries ) : IPStack
connectionStringEntries string>.Dictionary Connection string key/value pairs.
리턴 IPStack

IsDestinationReachable() 공개 정적인 메소드

Determines if the specified UDP destination is listening for data.
public static IsDestinationReachable ( IPEndPoint targetIPEndPoint ) : bool
targetIPEndPoint System.Net.IPEndPoint The for the UDP destination to be checked.
리턴 bool

IsIPv6IP() 공개 정적인 메소드

Determines if the specified ipAddress is an IPv6 IP.
public static IsIPv6IP ( string ipAddress ) : bool
ipAddress string IP address to check.
리턴 bool

IsLocalAddress() 공개 정적인 메소드

Determines if an IP address (or DNS name) is a local IP address.
An error is encountered when resolving . is an invalid IP address. The length of is greater than 255 characters. is null.
public static IsLocalAddress ( string hostNameOrAddress ) : bool
hostNameOrAddress string DNS name or IP address to test.
리턴 bool

IsMulticastIP() 공개 정적인 메소드

Determines if the specified ipAddress is a multicast IP.
public static IsMulticastIP ( IPAddress ipAddress ) : bool
ipAddress System.Net.IPAddress IP address to check.
리턴 bool

IsPortNumberValid() 공개 정적인 메소드

Determines whether the specified port is valid.
public static IsPortNumberValid ( string port ) : bool
port string The port number to be validated.
리턴 bool