ObjectiveLib  1.0.0
Public Member Functions | Static Public Member Functions | Protected Attributes
OLUnixServerSocket Class Reference

A server socket that communciates in the Unix domain. More...

#import <Socket.h>

Inheritance diagram for OLUnixServerSocket:
Inheritance graph
[legend]

List of all members.

Public Member Functions

(void) - bindToAddress:
 Bind the socket to a local address.
(void) - close
 Close the socket.
(OLSocketAddress *) - localAddress
 Return the local address.

Static Public Member Functions

(id) + socket
 Create and return a new socket.
(id) + socketWithLocalUnixAddress:
 Create and return a new socket.
(id) + socketWithLocalUnixAddress:queueLength:
 Create and return a new socket.
(id) + socketWithQueueLength:
 Create and return a new socket.

Protected Attributes

OLUnixAddresslocalAddress
 The local address to which this server is bound.

Detailed Description

A server socket that communciates in the Unix domain.

Unix domain sockets don't necessarily have anything to do with Unix; it's just a description of the address family. This class is capable of accepting connections from any Unix domain socket, include OLUnixClientSocket.

See also:
OLUnixClientSocket, OLUnixAddress

Member Function Documentation

- (void) bindToAddress: (OLSocketAddress *)  address

Bind the socket to a local address.

After successfully sending this message the socket will be assigned the local address.

Exceptions:
OLSocketExceptionif there is a problem binding the socket
Parameters:
addressthe address that should be assigned to the socket

Reimplemented from OLServerSocket.

- (void) close

Close the socket.

The socket will no longer be available for communication after receiving this message.

Exceptions:
OLSocketExceptionif there is an error closing the socket

Reimplemented from OLSocket.

Return the local address.

The local address is the address to which this socket is bound.

See also:
- remoteAddress (OLSocket)
Exceptions:
OLSocketExceptionif the socket is not bound to a local address
Returns:
the local address

Reimplemented from OLSocket.

+ (id) socket

Create and return a new socket.

Create and return a new socket.

An unbound server socket is created that has a queue length of 50.

Exceptions:
OLSocketExceptionif the socket cannot be created
Returns:
a reference to the newly created socket

Create and return a new socket.

Create and return a new socket.

A server socket is created that is bound to the local address and has a queue length of 50.

Exceptions:
OLSocketExceptionif the socket cannot be created and bound
Parameters:
addressthe address to which the socket should be bound
Returns:
a reference to the newly created socket
+ (id) socketWithLocalUnixAddress: (OLUnixAddress *)  address
queueLength: (unsigned)  qLen 

Create and return a new socket.

Create and return a new socket.

A server socket is created that is bound to the local address and has a queue length of qLen.

Exceptions:
OLSocketExceptionif the socket cannot be created and bound
Parameters:
addressthe address to which the socket should be bound
qLenthe length of the server's queue
Returns:
a reference to the newly created socket
+ (id) socketWithQueueLength: (unsigned)  qLen

Create and return a new socket.

Create and return a new socket.

An unbound server socket is created that has a queue length of qLen.

Exceptions:
OLSocketExceptionif the socket cannot be created
Parameters:
qLenthe length of the server's queue
Returns:
a reference to the newly created socket

Member Data Documentation

- (OLUnixAddress*) localAddress [protected]

The local address to which this server is bound.


The documentation for this class was generated from the following file:

ObjectiveLibGenerated Sat Feb 15 2014 07:45:35, © 2004-2007 Will Mason