GEOS SDK TechDocs|
|
3.1 Letting the User Choose an Address |
3.3 Hardware Ports SocketGetAddressSize(), SocketGetSocketName(), SocketGetPeerName()
Most programs blindly use addresses supplied by the user or use only hard-wired addresses. Only a few programs need to access and manipulate addresses. The Socket library provides a few utility routines for this purpose.
To find out the maximum address data size for a given domain, call
SocketGetAddressSize()
. This can be helpful when allocating memory to handle a full address, such as that returned by the
SocketGetSocketName()
and
SocketGetPeerName()
functions.
If a socket is connected, call
SocketGetPeerName()
to get the address of the socket at the other end of the connection. To find out the address used to represent the socket's own side of the connection, call
SocketGetSocketName()
.
GEOS SDK TechDocs|
|
3.1 Letting the User Choose an Address |
3.3 Hardware Ports