#import <ObjectiveLib/Socket.h>
Inheritance diagram for OLClientSocket:
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. |
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.
- (void) connectToAddress: | (OLSocketAddress *) | address |
Connect to a server.
The server at address is contacted to establish a connection.
OLSocketException | if the connection cannot be made |
address | the address of the server to which to connect |
- (id) init |
Initialize the socket.
OLSocketException | if the socket cannot be initialized |
- (id) initWithRemoteAddress: | (OLSocketAddress *) | remote |
Initialize the socket.
The socket is immediately connected to the address remote.
OLSocketException | if the socket cannot be initialized |
remote | the server to which this client should connect |
- (id) initWithRemoteAddress: | (OLSocketAddress *) | remote | ||
localAddress: | (OLSocketAddress *) | local | ||
Initialize the socket.
The socket is immediately bound to the address local, connected to the address remote.
OLSocketException | if the socket cannot be initialized |
remote | the server to which this client should connect | |
local | the address to which this socket should be bound |
|