ObjectiveLib  1.0.0
Public Member Functions
OLClientSocket Class Reference

A socket that can initiate a connection with a server. More...

#import <ObjectiveLib/Socket.h>

Inheritance diagram for OLClientSocket:
Inheritance graph
[legend]

List of all members.

Public Member Functions

(void) - connectToAddress:
 Connect to a server.
Initializers and Deallocators
(id) - init
 Initialize the socket.
(id) - initWithRemoteAddress:
 Initialize the socket.
(id) - initWithRemoteAddress:localAddress:
 Initialize the socket.

Detailed Description

A socket that can initiate a connection with a server.

A client typically obtains the address of a server and connects to it by calling connectToAddress: (OLClientSocket). After a successful connection is made the client may use its streams to communicate with the server.

A client may bind to a local address, but it is not strictly necessary. A local address will be automatically assigned to the client when a connection is made if the client does not already have a local address.

See also:
OLServerSocket

Member Function Documentation

- (void) connectToAddress: (OLSocketAddress *)  address

Connect to a server.

The server at address is contacted to establish a connection.

Exceptions:
OLSocketExceptionif the connection cannot be made
Parameters:
addressthe address of the server to which to connect
- (id) init

Initialize the socket.

Exceptions:
OLSocketExceptionif the socket cannot be initialized
Returns:
a reference to this socket

Initialize the socket.

The socket is immediately connected to the address remote.

Exceptions:
OLSocketExceptionif the socket cannot be initialized
Parameters:
remotethe server to which this client should connect
Returns:
a reference to this socket
- (id) initWithRemoteAddress: (OLSocketAddress *)  remote
localAddress: (OLSocketAddress *)  local 

Initialize the socket.

The socket is immediately bound to the address local, connected to the address remote.

Exceptions:
OLSocketExceptionif the socket cannot be initialized
Parameters:
remotethe server to which this client should connect
localthe address to which this socket should be bound
Returns:
a reference to this socket

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

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