|
|
SocketImpl Class ReferenceDefault Socket Implementation.
More...
Inheritance diagram for SocketImpl:
[legend]Collaboration diagram for SocketImpl:
[legend]List of all members.
Detailed Description
Default Socket Implementation.
This implementation does not implement any security check.
Member Function Documentation
|
Accepts a connection.
- Parameters:
-
- Exceptions:
-
SocketTimeoutException | if a timeout was previously set with setSoTimeout and the timeout has been reached. |
SocketException | if an I/O error occurs when accepting the connection |
|
|
Returns the number of bytes that can be read from this socket without blocking.
- Returns:
- the number of bytes that can be read from this socket without blocking.
|
void bind |
( |
InetAddress |
host, |
|
|
int |
port |
|
) |
|
|
|
Binds this socket to the specified port number on the specified host. - Parameters:
-
host | the host address |
port | the port number. |
- Exceptions:
-
BindException | if an I/O error occurs when binding this socket. |
|
void connect |
( |
const String & |
host, |
|
|
int |
port |
|
) |
|
|
|
Connects this socket to the specified port on the named host. |
void connect |
( |
InetAddress |
address, |
|
|
int |
port |
|
) |
|
|
|
Connects this socket to the specified port number on the specified host. |
void create |
( |
bool |
stream |
) |
|
|
|
Creates either a stream or a datagram socket. |
int getFileDescriptor |
( |
|
) |
const [inline] |
|
|
Returns the value of this socket's fd field. |
InetAddress getInetAddress |
( |
|
) |
const [inline] |
|
|
Returns the value of this socket's address field. |
int getLocalPort |
( |
|
) |
const [inline] |
|
|
Returns the value of this socket's localport field. |
int getPort |
( |
|
) |
const [inline] |
|
|
Returns the value of this socket's port field. |
int getSoTimeout |
( |
|
) |
const |
|
|
Retrive setting for SO_TIMEOUT. |
void listen |
( |
int |
backlog |
) |
|
|
|
Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument. |
void setSoTimeout |
( |
int |
timeout |
) |
|
|
|
Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds. |
String toString |
( |
|
) |
const |
|
|
Returns the address and port of this socket as a String. |
Member Data Documentation
|
The IP address of the remote end of this socket. |
|
The file descriptor object for this socket. |
|
The local port number to which this socket is connected. |
|
The port number on the remote host to which this socket is connected. |
The documentation for this class was generated from the following files:
- socketimpl.h
- socketimpl.cpp
|
|
Copyright © 1999-2004, Apache Software Foundation
|