C# Class bedrock.net.Address

Afficher le fichier Open project: codebutler/jabber-net Class Usage Examples

Méthodes publiques

Méthode Description
Address ( IPAddress ip, int port ) : System

Create a new connection endpoint, where the IP address is already known.

Address ( int port ) : System

Address for a server, corresponding to IPAddress.Any.

Address ( string hostname, int port ) : System

New connection endpoint.

LookupSRV ( string prefix, string domain, string &host, int &port ) : void

Look up a DNS SRV record, returning the best host and port number to connect to.

LookupTXT ( string prefix, string domain, string attribute ) : string

Look up a DNS TXT record.

Resolve ( ) : void

Synchronous DNS lookup.

Resolve ( AddressResolved callback ) : void

Async DNS lookup. IP will be null in callback on failure. Callback will be called immediately if IP is already known (e.g. dotted-quad).

ToString ( ) : string

Readable representation of the address. Host (IP):port

Private Methods

Méthode Description
OnResolved ( IAsyncResult ar ) : void

Handle the async DNS response.

PickSRV ( SRVRecord srv ) : SRVRecord

Method Details

Address() public méthode

Create a new connection endpoint, where the IP address is already known.
public Address ( IPAddress ip, int port ) : System
ip System.Net.IPAddress
port int
Résultat System

Address() public méthode

Address for a server, corresponding to IPAddress.Any.
public Address ( int port ) : System
port int
Résultat System

Address() public méthode

New connection endpoint.
public Address ( string hostname, int port ) : System
hostname string Host name or dotted-quad IP address
port int Port number
Résultat System

LookupSRV() public static méthode

Look up a DNS SRV record, returning the best host and port number to connect to.
public static LookupSRV ( string prefix, string domain, string &host, int &port ) : void
prefix string The SRV prefix, ending with a dot. Example: "_xmpp-client._tcp."
domain string The domain to check
host string The host name to connect to
port int The port number to connect to
Résultat void

LookupTXT() public static méthode

Look up a DNS TXT record.
public static LookupTXT ( string prefix, string domain, string attribute ) : string
prefix string The prefix, ending in '.'. Example: "_xmppconnect."
domain string The domain to search
attribute string The attribute name to look for. Example: "_xmpp-client-xbosh"
Résultat string

Resolve() public méthode

Synchronous DNS lookup.
public Resolve ( ) : void
Résultat void

Resolve() public méthode

Async DNS lookup. IP will be null in callback on failure. Callback will be called immediately if IP is already known (e.g. dotted-quad).
public Resolve ( AddressResolved callback ) : void
callback AddressResolved Called when resolution complete.
Résultat void

ToString() public méthode

Readable representation of the address. Host (IP):port
public ToString ( ) : string
Résultat string