SDK Home Glossary Index Left Right Up

Host Resolver


Section contents


Overview

Defined in

csocket.oxh


Construction / destruction


NewHostResolver - Create a host resolver object

Usage

this& = NewHostResolver&:

Description

Create a host resolver object and returns a handle to the created object.

Return Value
this& An value which represents the created host resolver
Error Handling

If the object could not be created then an error is generated which should be trapped by an ONERR handler.


DeleteHostResolver - Destroy the host resolver object

Usage

DeleteHostResolver:(BYREF this&)

Description

Destroys the host resolver object.

Arguments
BYREF this& A handle to a host resolver object. A zero value is written back into the variable

Methods provided


HostResolverCancel - Cancel outstanding operations

Usage

HostResolverCancel:(this&)

Description

Cancels any outstanding operations to the host resolver service.

Arguments
this& A handle to a host resolver object

HostResolverClose - Close connection

Usage

HostResolverClose:(this&)

Description

Cloases the connection to the host resolver service.

Arguments
this& A handle to a host resolver object

HostResolverGetByAddressA - Get name entry by address (asynchronous)

Usage

HostResolverGetByAddressA:(this&,address&,result&,BYREF status&)

Description

Get the name entry associated with the socket address.

Arguments
this& A handle to a host resolver object
address& A handle to a socket address object
result& A handle to a name entry object
BYREF status& The status of the asynchronous operation
Error Handling

If the status& object cannot be created then an error is generated which should be trapped by an ONERR handler.


HostResolverGetByNameA - Get name entry by name (asynchronous)

Usage

HostResolverGetByNameA:(this&,name$,result&,BYREF status&)

Description

Get the name entry associated with the name.

If called with name$ set to a null hostname, it will return an address of 0.0.0.0 if no interface exists and the address of the interface with the highest speed metric otherwise on the local host. This can be used to determine the IP address of the local host.

Arguments
this& A handle to a host resolver object
name$ The name of the host
result& A handle to a name entry object
BYREF status& The status of the asynchronous operation
Error Handling

If the status& object cannot be created then an error is generated which should be trapped by an ONERR handler.


HostResolverGetHostNameA

Usage

HostResolverGetHostNameA:(this&,des&,BYREF status&)

Description

<TBS>

Arguments
this& A handle to a host resolver object
des& A handle to a descriptor
BYREF status& The status of the asynchronous operation
Error Handling

If the status& object cannot be created then an error is generated which should be trapped by an ONERR handler.


HostResolverGetNextA

Usage

HostResolverGetNextA:(this&,result&,BYREF status&)

Description

<TBS>

Arguments
this& A handle to a host resolver object
result& A handle to a name entry object
BYREF status& The status of the asynchronous operation
Error Handling

If the status& object cannot be created then an error is generated which should be trapped by an ONERR handler.


HostResolverOpen

Usage

err% = HostResolverOpen%:(this&,socketserv&,family&,protocol&)

Description

Opens a connection to the host resolver service.

Arguments
this& A handle to a host resolver object
socketserv& The socket server session; a handle to a SocketServ object
family& Specifies the address family
protocol& Specifies the protocol
Return value
err% The result of the operation

HostResolverSetHostName

Usage

err% = HostResolverSetHostName%:(this&,str$)

Description

<TBS>

Arguments
this& A handle to a host resolver object
str$ A string containing the host name
Return value
err% The result of the operation

  SDK Home Glossary Index Left Right Up