|
|||||||||
| Home >> All >> com >> act365 >> [ net overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.act365.net
Class GeneralSocketImpl

java.lang.Objectjava.net.SocketImpl
com.act365.net.GeneralSocketImpl
- All Implemented Interfaces:
- java.net.SocketOptions
- Direct Known Subclasses:
- TCPSocketImpl
- public abstract class GeneralSocketImpl
- extends java.net.SocketImpl
GeneralDatagramSocketImpl extends java.net.SocketImpl
and provides native implementations of all of its abstract methods. The
class remains abstract because it leaves its create() method
undefined - it is up to subclasses to specify the parameters that will
be used to create the underlying socket. The native code calls into the
local Berkeley sockets implementation.
| Field Summary |
| Fields inherited from class java.net.SocketImpl |
address, fd, localport, port |
| Fields inherited from interface java.net.SocketOptions |
IP_MULTICAST_IF, IP_MULTICAST_IF2, IP_MULTICAST_LOOP, IP_TOS, SO_BINDADDR, SO_BROADCAST, SO_KEEPALIVE, SO_LINGER, SO_OOBINLINE, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY |
| Constructor Summary | |
GeneralSocketImpl()
|
|
| Method Summary | |
(package private) static int |
_accept(int sd,
java.net.SocketImpl newSocket)
|
(package private) static int |
_bind(int sd,
byte[] ipAddress,
int port)
|
(package private) static int |
_close(int sd)
|
(package private) static int |
_connect(int sd,
byte[] ipAddress,
int port)
|
(package private) static java.net.InetAddress |
_createInetAddress(int family,
byte[] ipAddress)
|
(package private) static java.lang.Object |
_getOption(int socketDescriptor,
int optionName)
|
(package private) static int |
_getSocketDescriptor(java.io.FileDescriptor fd)
|
(package private) static int |
_listen(int sd,
int backlog)
|
(package private) static int |
_setOption(int socketDescriptor,
int optionName,
java.lang.Object newValue)
|
(package private) static void |
_setSocketDescriptor(java.io.FileDescriptor fd,
int sd)
|
(package private) static int |
_socket(int addressFamily,
int socketType,
int protocol)
|
void |
accept(java.net.SocketImpl newSocket)
Accepts a connection request for this socket. |
int |
available()
available() isn't supported. |
void |
bind(java.net.InetAddress inetAddress,
int port)
Binds this socket to the local port. |
void |
close()
Closes this socket. |
void |
connect(java.net.InetAddress dst,
int remotePort)
Connects this socket to a given destination. |
void |
connect(java.net.SocketAddress address,
int timeout)
Connects to the specified host. |
void |
connect(java.lang.String hostName,
int port)
Connects this socket to a named host. |
void |
create(int socketType,
int protocol)
Creates a new unconnected TCP socket. |
static java.net.InetAddress |
createInetAddress(int family,
byte[] ipAddress)
Creates a java.net.InetAddress object with a given IP address. |
java.io.InputStream |
getInputStream()
Gets the input stream. |
java.lang.Object |
getOption(int optID)
Gets the value of a socket option. |
java.io.OutputStream |
getOutputStream()
Gets the output stream. |
static int |
getSocketDescriptor(java.io.FileDescriptor fd)
Gets the socket descriptor from a java.io.FileDescriptor object. |
void |
listen(int backlog)
Listens for connection requests on this socket. |
void |
sendUrgentData(int data)
Urgent data isn't supported. |
void |
setOption(int optID,
java.lang.Object value)
Sets the value of a socket option.The value has to be an Integer object. |
static void |
setSocketDescriptor(java.io.FileDescriptor fd,
int sd)
Sets the socket descriptor for a java.io.FileDescriptor object. |
| Methods inherited from class java.net.SocketImpl |
create, getFileDescriptor, getInetAddress, getLocalPort, getPort, shutdownInput, shutdownOutput, supportsUrgentData, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
GeneralSocketImpl
public GeneralSocketImpl()
| Method Detail |
create
public void create(int socketType,
int protocol)
throws java.io.IOException
- Creates a new unconnected TCP socket.
_socket
static int _socket(int addressFamily,
int socketType,
int protocol)
bind
public void bind(java.net.InetAddress inetAddress, int port) throws java.io.IOException
- Binds this socket to the local port.
_bind
static int _bind(int sd,
byte[] ipAddress,
int port)
connect
public void connect(java.lang.String hostName, int port) throws java.io.IOException
- Connects this socket to a named host.
connect
public void connect(java.net.InetAddress dst, int remotePort) throws java.io.IOException
- Connects this socket to a given destination.
connect
public void connect(java.net.SocketAddress address, int timeout) throws java.io.IOException
- Connects to the specified host.
_connect
static int _connect(int sd,
byte[] ipAddress,
int port)
listen
public void listen(int backlog)
throws java.io.IOException
- Listens for connection requests on this socket.
_listen
static int _listen(int sd,
int backlog)
accept
public void accept(java.net.SocketImpl newSocket) throws java.io.IOException
- Accepts a connection request for this socket.
_accept
static int _accept(int sd,
java.net.SocketImpl newSocket)
close
public void close()
throws java.io.IOException
- Closes this socket.
_close
static int _close(int sd)
getSocketDescriptor
public static int getSocketDescriptor(java.io.FileDescriptor fd)
- Gets the socket descriptor from a
java.io.FileDescriptorobject. NB Java provides no public access to the value of the descriptor so it has to be extracted using native code.
_getSocketDescriptor
static int _getSocketDescriptor(java.io.FileDescriptor fd)
setSocketDescriptor
public static void setSocketDescriptor(java.io.FileDescriptor fd, int sd)
- Sets the socket descriptor for a
java.io.FileDescriptorobject. NB Java provides no public access to the descriptor so its value has to be set using native code.
_setSocketDescriptor
static void _setSocketDescriptor(java.io.FileDescriptor fd, int sd)
createInetAddress
public static java.net.InetAddress createInetAddress(int family, byte[] ipAddress)
- Creates a
java.net.InetAddressobject with a given IP address.
_createInetAddress
static java.net.InetAddress _createInetAddress(int family, byte[] ipAddress)
setOption
public void setOption(int optID,
java.lang.Object value)
throws java.net.SocketException
- Sets the value of a socket option.The value has to be an
Integerobject.
_setOption
static int _setOption(int socketDescriptor,
int optionName,
java.lang.Object newValue)
getOption
public java.lang.Object getOption(int optID) throws java.net.SocketException
- Gets the value of a socket option. The returned value will be an
Integerobject.
_getOption
static java.lang.Object _getOption(int socketDescriptor, int optionName) throws java.net.SocketException
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException
- Gets the output stream.
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOException
- Gets the input stream.
available
public int available()
throws java.io.IOException
available()isn't supported.
sendUrgentData
public void sendUrgentData(int data)
throws java.io.IOException
- Urgent data isn't supported.
|
|||||||||
| Home >> All >> com >> act365 >> [ net overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC