- Inherits from:
- Object
- Conforms to:
- DSocketAddressable
- Declared in:
- DSocketAddress.h
Object
|
+---DInetSocketAddress
Class Description
The DInetSocketAddress class implements a number of methods for using
inet socket addresses.
- Last modified:
- 12-Nov-2005 (DSocketAddress.h)
Instance Variables
- private struct sockaddr _address
- the socket address
- private struct sockaddr_in *_inet
- the cast to inet socket address
- private int _error
- the last error (for host method)
- Constructors
- - (DInetSocketAddress *) init
- Initialise the socket address
- Returns:
- the object
- - (DInetSocketAddress *) init :(long) address :(int) port
- Initialise the socket address with an inet address
- Parameters:
- address - the inet address
port - the port
- Returns:
- the object
- - (DInetSocketAddress *) init :(unsigned char) b1 :(unsigned char) b2 :(unsigned char) b3 :(unsigned char) b4 :(int) port
- Initialise the socket address with an inet address (b1.b2.b3.b4)
- Parameters:
- b1 - the first byte of the inet address
b2 - the second byte of the inet address
b3 - the third byte of the inet address
b4 - the fourth byte of the inet address
port - the port
- Returns:
- the object
- Copy related methods
- - copy
- Copy the object
- Returns:
- the object
- - deepen
- Deepen the object
- Returns:
- the object
- Deconstructor
- - free
- Free the socket object
- Returns:
- the object
- Member services
- - (int) error
- Return the last error
- Returns:
- the last error
- - (int) family
- Return the family of the socket address
- Returns:
- the family
- - (DText *) host
- Return the host name
- Returns:
- a (new) text object with the host name (or nil for not found)
- - (int) port
- Return the port (network format)
- Returns:
- the port
- - (int) size
- Return the size of the socket address
- Returns:
- the size
- - (void *) sockaddr
- Return the socket address
- Returns:
- the socket address
- Socket address setters
- - (DInetSocketAddress *) any :(int) port
- Set the any address for the inet socket address
- Parameters:
- port - the port
- Returns:
- the object
- - (DInetSocketAddress *) broadcast :(int) port
- Set the broadcast address for an inet socket address
- Parameters:
- port - the port
- Returns:
- the object
- - (DInetSocketAddress *) close
- Close the socket address
- Returns:
- the object
- - (BOOL) host :(const char *) name :(int) port
- Set the socket address with an inet host
- Parameters:
- host - the host name for the inet address
port - the port for the address
- Returns:
- the object
- - (DInetSocketAddress *) loopback :(int) port
- Set the loopback address for an inet socket address
- Parameters:
- port - the port
- Returns:
- the object
- - (DInetSocketAddress *) set :(unsigned long) address :(int) port
- Set the socket address with an inet address
- Parameters:
- address - the inet address
address - the port of the address
- Returns:
- the object
- - (DInetSocketAddress *) set :(unsigned char) b1 :(unsigned char) b2 :(unsigned char) b3 :(unsigned char) b4 :(int) port
- Set the socket address with an inet address
- Parameters:
- b1 - the first byte of the inet address
b2 - the second byte of the inet address
b3 - the third byte of the inet address
b4 - the fourth byte of the inet address
port - the port of the address
- Returns:
- the object
- - (BOOL) sockaddr :(void *) addr :(int) size
- Set the socket address with an external socket address
- Parameters:
- addr - the socket address
size - the size of the socket address
- Returns:
- success
generated 08-Jan-2006 by ObjcDoc 3.0.0