C# Class SIPSorcery.Sys.IPSocket

Mostra file Open project: sipsorcery/sipsorcery Class Usage Examples

Public Methods

Method Description
GetIPEndPoint ( string IPSocket ) : IPEndPoint

Returns an IPv4 end point from a socket address in 10.0.0.1:5060 format.

GetSocketString ( IPEndPoint endPoint ) : string
IsIPAddress ( string socket ) : bool
IsIPSocket ( string socket ) : bool
IsPrivateAddress ( string host ) : bool

Checks the Contact SIP URI host and if it is recognised as a private address it is replaced with the socket the SIP message was received on. Private address space blocks RFC 1597. 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255

ParseHostFromSocket ( string socket ) : string
ParsePortFromSocket ( string socket ) : int
ParseSocketString ( string socket ) : IPEndPoint
ParseSocketString ( string socket, string &host, int &port ) : void

Method Details

GetIPEndPoint() public static method

Returns an IPv4 end point from a socket address in 10.0.0.1:5060 format.
public static GetIPEndPoint ( string IPSocket ) : IPEndPoint
IPSocket string
return System.Net.IPEndPoint

GetSocketString() public static method

public static GetSocketString ( IPEndPoint endPoint ) : string
endPoint System.Net.IPEndPoint
return string

IsIPAddress() public static method

public static IsIPAddress ( string socket ) : bool
socket string
return bool

IsIPSocket() public static method

public static IsIPSocket ( string socket ) : bool
socket string
return bool

IsPrivateAddress() public static method

Checks the Contact SIP URI host and if it is recognised as a private address it is replaced with the socket the SIP message was received on. Private address space blocks RFC 1597. 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255
public static IsPrivateAddress ( string host ) : bool
host string
return bool

ParseHostFromSocket() public static method

public static ParseHostFromSocket ( string socket ) : string
socket string
return string

ParsePortFromSocket() public static method

public static ParsePortFromSocket ( string socket ) : int
socket string
return int

ParseSocketString() public static method

public static ParseSocketString ( string socket ) : IPEndPoint
socket string
return System.Net.IPEndPoint

ParseSocketString() public static method

public static ParseSocketString ( string socket, string &host, int &port ) : void
socket string
host string
port int
return void