SDK Home Glossary Index Left Right Up

Socket Address


Section contents


Overview

Defined in

csocket.oxh

Description

The class represents an end point address. Protocols interpret the class within the socket server to route packets and form connections.


Construction / destruction


NewSockAddr

Usage

this& = NewSockAddr&:

Description

Create a socket address object and returns a handle to the created object.

Return Value
this& A handle which represents the created socket address object
Error Handling

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


DeleteSockAddr

Usage

DeleteSockAddr:(BYREF this&)

Description

Destroys the socket address object.

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

Methods provided


SockAddrCmpPort

Usage

bool% = SockAddrCmpPort%:(this&,address&)

Description

Use this function to compare ports in two addresses.

Arguments
this& A handle to a socket address object
address& A handle to a socket address object
Return
bool% KTrue%(-1) if the ports match and KFalse%(0)if they do not.

SockAddrFamily

Usage

family& = SockAddrFamily&:(this&)

Description

Returns the address family of the address.

This can be used to determine whether this object is in fact an object which is derived from this one:

Family Derived class object
KAfInet& Internet Address
KAfIrdaAddrFamily& Irda Socket Address
Arguments
this& A handle to a socket address object
Return
family& Specifies the address family

SockAddrSetFamily

Usage

SockAddrSetFamily:(this&,family&)

Description

Use this function to set the address family of an address.

Arguments
this& A handle to a socket address object
family& Specifies the address family

SockAddrPort

Usage

port& = SockAddrPort&:(this&)

Description

Use this function to determine the port value.

Arguments
this& A handle to a socket address object
Return
port& The port in the address

SockAddrSetPort

Usage

SockAddrSetPort:(this&,port&)

Description

Use this function to set the address port of an address.

Arguments
this& A handle to a socket address object
port& The port to set in the address

  SDK Home Glossary Index Left Right Up