| Modifier and Type | Field and Description |
|---|---|
| protected final SocketImpl |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected int | available()
Implements abstract java. Returns the number of bytes that can be read from this socket without blocking. |
| protected void | bind(InetAddress host, int port)
Implements abstract java. Binds this socket to the specified local IP address and port number. |
| protected void | |
| protected void | connect(String host, int port)
Implements abstract java. Connects this socket to the specified port on the named host. |
| protected void | connect(InetAddress address, int port)
Implements abstract java. Connects this socket to the specified port number on the specified host. |
| protected void | connect(SocketAddress address, int timeout)
Implements abstract java. Connects this socket to the specified port number on the specified host. |
| protected void | |
| pack-priv final SocketImpl | |
| protected FileDescriptor | getFileDescriptor()
Overrides java. Returns the value of this socket's |
| protected InetAddress | getInetAddress()
Overrides java. Returns the value of this socket's |
| protected InputStream | getInputStream()
Implements abstract java. Returns an input stream for this socket. |
| protected int | getLocalPort()
Overrides java. Returns the value of this socket's |
| protected <T> T | getOption(SocketOption<T> opt)
Overrides java. Called to get a socket option. |
| public Object | |
| protected OutputStream | getOutputStream()
Implements abstract java. Returns an output stream for this socket. |
| protected int | |
| protected void | listen(int backlog)
Implements abstract java. Sets the maximum queue length for incoming connection indications
(a request to connect) to the |
| protected void | sendUrgentData(int data)
Implements abstract java. Send one byte of urgent data on the socket. |
| protected <T> void | setOption(SocketOption<T> opt, T value)
Overrides java. Called to set a socket option. |
| public void | setOption(int optID, Object value)
Implements java. Enable/disable the option specified by |
| protected void | shutdownInput()
Overrides java. Places the input stream for this socket at "end of stream". |
| protected void | shutdownOutput()
Overrides java. Disables the output stream for this socket. |
| protected Set | supportedOptions()
Overrides java. Returns a set of SocketOptions supported by this impl and by this impl's socket (Socket or ServerSocket) |
| protected boolean | supportsUrgentData()
Overrides java. Returns whether or not this SocketImpl supports sending urgent data. |
| delegate | back to summary |
|---|---|
| protected final SocketImpl delegate | |
| DelegatingSocketImpl | back to summary |
|---|---|
| pack-priv DelegatingSocketImpl(SocketImpl delegate) | |
| accept | back to summary |
|---|---|
| protected void accept(SocketImpl s) throws IOException Implements abstract java. Doc from java. Accepts a connection.
| |
| available | back to summary |
|---|---|
| protected int available() throws IOException Implements abstract java. Doc from java. Returns the number of bytes that can be read from this socket without blocking.
| |
| bind | back to summary |
|---|---|
| protected void bind(InetAddress host, int port) throws IOException Implements abstract java. Doc from java. Binds this socket to the specified local IP address and port number.
| |
| close | back to summary |
|---|---|
| protected void close() throws IOException Implements abstract java. Doc from java. Closes this socket.
| |
| connect | back to summary |
|---|---|
| protected void connect(String host, int port) throws IOException Implements abstract java. Doc from java. Connects this socket to the specified port on the named host.
| |
| connect | back to summary |
|---|---|
| protected void connect(InetAddress address, int port) throws IOException Implements abstract java. Doc from java. Connects this socket to the specified port number on the specified host.
| |
| connect | back to summary |
|---|---|
| protected void connect(SocketAddress address, int timeout) throws IOException Implements abstract java. Doc from java. Connects this socket to the specified port number on the specified host. A timeout of zero is interpreted as an infinite timeout. The connection will then block until established or an error occurs.
| |
| create | back to summary |
|---|---|
| protected void create(boolean stream) throws IOException Implements abstract java. Doc from java. Creates a stream socket.
| |
| delegate | back to summary |
|---|---|
| pack-priv final SocketImpl delegate() | |
| getFileDescriptor | back to summary |
|---|---|
| protected FileDescriptor getFileDescriptor() Overrides java. Doc from java. Returns the value of this socket's
| |
| getInetAddress | back to summary |
|---|---|
| protected InetAddress getInetAddress() Overrides java. Doc from java. Returns the value of this socket's
| |
| getInputStream | back to summary |
|---|---|
| protected InputStream getInputStream() throws IOException Implements abstract java. Doc from java. Returns an input stream for this socket.
| |
| getLocalPort | back to summary |
|---|---|
| protected int getLocalPort() Overrides java. Doc from java. Returns the value of this socket's
| |
| getOption | back to summary |
|---|---|
| protected <T> T getOption(SocketOption<T> opt) throws IOException Overrides java. Doc from java. Called to get a socket option.
| |
| getOption | back to summary |
|---|---|
| public Object getOption(int optID) throws SocketException Implements java. Doc from java. Fetch the value of an option. Binary options will return SocketImpl s; ... Boolean noDelay = (Boolean)(s.getOption(TCP_NODELAY)); if (noDelay.booleanValue()) { // true if TCP_NODELAY is enabled... ... }
For options that take a particular type as a parameter, this method will return the
parameter's value, else it will return Object o = s.getOption(SO_LINGER); if (o instanceof Integer) { System.out.print("Linger time is " + ((Integer)o).intValue()); } else { // the true type of o is java.lang.Boolean.FALSE; }
| |
| getOutputStream | back to summary |
|---|---|
| protected OutputStream getOutputStream() throws IOException Implements abstract java. Doc from java. Returns an output stream for this socket.
| |
| getPort | back to summary |
|---|---|
| protected int getPort() Overrides java. Doc from java. Returns the value of this socket's
| |
| listen | back to summary |
|---|---|
| protected void listen(int backlog) throws IOException Implements abstract java. Doc from java. Sets the maximum queue length for incoming connection indications
(a request to connect) to the
| |
| sendUrgentData | back to summary |
|---|---|
| protected void sendUrgentData(int data) throws IOException Implements abstract java. Doc from java. Send one byte of urgent data on the socket. The byte to be sent is the low eight bits of the parameter
| |
| setOption | back to summary |
|---|---|
| protected <T> void setOption(SocketOption<T> opt, T value) throws IOException Overrides java. Doc from java. Called to set a socket option.
| |
| setOption | back to summary |
|---|---|
| public void setOption(int optID, Object value) throws SocketException Implements java. Doc from java. Enable/disable the option specified by SocketImpl s; ... s.setOption(SO_LINGER, Integer.valueOf(10)); // OK - set SO_LINGER w/ timeout of 10 sec. s.setOption(SO_LINGER, Double.valueOf(10)); // ERROR - expects java.lang.Integer Boolean:
s.setOption(TCP_NODELAY, Boolean.TRUE); // OK - enables TCP_NODELAY, a binary option Boolean#FALSE:
s.setOption(TCP_NODELAY, Boolean.FALSE); // OK - disables TCP_NODELAY s.setOption(SO_LINGER, Boolean.FALSE); // OK - disables SO_LINGER Boolean#FALSE implicitly enables it.
| |
| shutdownInput | back to summary |
|---|---|
| protected void shutdownInput() throws IOException Overrides java. Doc from java. Places the input stream for this socket at "end of stream".
Any data sent to this socket is acknowledged and then
silently discarded.
If you read from a socket input stream after invoking this method on the
socket, the stream's
| |
| shutdownOutput | back to summary |
|---|---|
| protected void shutdownOutput() throws IOException Overrides java. Doc from java. Disables the output stream for this socket. For a TCP socket, any previously written data will be sent followed by TCP's normal connection termination sequence. If you write to a socket output stream after invoking shutdownOutput() on the socket, the stream will throw an IOException.
| |
| supportedOptions | back to summary |
|---|---|
| protected Set Overrides java. Doc from java. Returns a set of SocketOptions supported by this impl and by this impl's socket (Socket or ServerSocket)
| |
| supportsUrgentData | back to summary |
|---|---|
| protected boolean supportsUrgentData() Overrides java. Doc from java. Returns whether or not this SocketImpl supports sending urgent data. By default, false is returned unless the method is overridden in a sub-class
| |