OLUnixAddress Class Reference
[Sockets]

An address for Unix domain sockets. More...

#import <ObjectiveLib/SocketAddress.h>

Inheritance diagram for OLUnixAddress:

Inheritance graph
[legend]
List of all members.

Public Member Functions

(id) - copyWithZone:
 Make a copy of this socket address allocating memory from zone.
(OLText *) - description
 Return a description of this address.
(const struct sockaddr *) - hostRepresentation
 Return a platform-dependent representation of the address.
(unsigned) - hostRepresentationLength
 Return the length of the host representation.
(BOOL) - isEqual:
 Return whether this address is equal to another one.
(const char *) - path
 Return the path name occupied by this socket address.
Initializers and Deallocators
(void) - dealloc
 Finalize the address and deallocate any allocated memory.
(id) - initWithPath:
 Initialize the socket address.

Static Public Member Functions

(id) + addressWithPath:
 Create and return a new socket address.

Protected Attributes

sockaddr_un * hostRep
 The host representation of the address.

Detailed Description

An address for Unix domain sockets.

Unix domain socket addresses occupy a position in the file system, so they are referred to by their path name.

See also:
OLUnixServerSocket, OLUnixClientSocket


Member Function Documentation

+ (id) addressWithPath: (const char *)  pth  

Create and return a new socket address.

The address is created with the given path.

Exceptions:
NSGenericException if pth cannot be converted to a valid file name or if the full path name cannot be resolved
Parameters:
pth the path in the file system for the address
Returns:
a reference to the newly created socket address

- (id) copyWithZone: (NSZone *)  zone  

Make a copy of this socket address allocating memory from zone.

Parameters:
zone the zone from which to allocate memory
Returns:
the copy

Reimplemented from OLSocketAddress.

- (void) dealloc  

Finalize the address and deallocate any allocated memory.

- (OLText*) description  

Return a description of this address.

The description is the same as the path name.

Note:
If OpenStep is present the returned object will be autoreleased before being returned.
See also:
- path
Returns:
the description

Reimplemented from OLSocketAddress.

- (const struct sockaddr*) hostRepresentation  

Return a platform-dependent representation of the address.

The returned data can be used in low-level socket operations and is intentionally opaque.

Returns:
the host representation

Reimplemented from OLSocketAddress.

- (unsigned) hostRepresentationLength  

Return the length of the host representation.

The length of the structure returned by hostRepresentation is returned.

Returns:
the length of the host representation

Reimplemented from OLSocketAddress.

- (id) initWithPath: (const char *)  pth  

Initialize the socket address.

The address is created with the given path.

Exceptions:
NSGenericException if pth cannot be converted to a valid file name or if the full path name cannot be resolved
Parameters:
pth the path in the file system for the address
Returns:
a reference to this socket address

- (BOOL) isEqual: (id)  object  

Return whether this address is equal to another one.

Parameters:
object the object with which to compare this one
Returns:
YES if object is equal to this address, NO otherwise

- (const char*) path  

Return the path name occupied by this socket address.

Returns:
the path name


Member Data Documentation

- (struct sockaddr_un*) hostRep [protected]

The host representation of the address.


The documentation for this class was generated from the following file:
ObjectiveLibGenerated Sun Apr 22 15:13:55 2007, © 2004-2007 Will Mason
SourceForge.net Logo