<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.net.SocketImpl
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.net.html">This Package</a>  <a href="java.net.Socket.html#_top_">Previous</a>  <a href="java.net.URL.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.net.SocketImpl
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----java.net.SocketImpl
</pre>
<hr>
<dl>
  <dt> public abstract class <b>SocketImpl</b>
  <dt> extends <a href="java.lang.Object.html#_top_">Object</a>
  <dt> implements SocketOptions
</dl>
The abstract class <code>SocketImpl</code> is a common superclass 
 of all classes that actually implement sockets. It is used to 
 create both client and server sockets. 
 <p>
 A "plain" socket implements these methods exactly as 
 described, without attempting to go through a firewall or proxy.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index">
</h2>
<dl>
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#address"><b>address</b></a>
  <dd>  The IP address of the remote end of this socket.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#fd"><b>fd</b></a>
  <dd>  The file descriptor object for this socket.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#localport"><b>localport</b></a>
  <dd>  The local port number to which this socket is connected.
  <dt> <img src="images/magenta-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#port"><b>port</b></a>
  <dd>  The port number on the remote host to which this socket is connected.
</dl>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#SocketImpl()"><b>SocketImpl</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#accept(java.net.SocketImpl)"><b>accept</b></a>(SocketImpl)
  <dd>  Accepts a connection.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#available()"><b>available</b></a>()
  <dd>  Returns the number of bytes that can be read from this socket
 without blocking.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#bind(java.net.InetAddress, int)"><b>bind</b></a>(InetAddress, int)
  <dd>  Binds this socket to the specified port number on the specified host.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#close()"><b>close</b></a>()
  <dd>  Closes this socket.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#connect(java.net.InetAddress, int)"><b>connect</b></a>(InetAddress, int)
  <dd>  Connects this socket to the specified port number on the specified host.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#connect(java.lang.String, int)"><b>connect</b></a>(String, int)
  <dd>  Connects this socket to the specified port on the named host.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#create(boolean)"><b>create</b></a>(boolean)
  <dd>  Creates either a stream or a datagram socket.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getFileDescriptor()"><b>getFileDescriptor</b></a>()
  <dd>  Returns the value of this socket's <code>fd</code> field.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getInetAddress()"><b>getInetAddress</b></a>()
  <dd>  Returns the value of this socket's <code>address</code> field.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getInputStream()"><b>getInputStream</b></a>()
  <dd>  Returns an input stream for this socket.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getLocalPort()"><b>getLocalPort</b></a>()
  <dd>  Returns the value of this socket's <code>localport</code> field.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getOption(int)"><b>getOption</b></a>(int)
  <dd>  Fetch the value of an option.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getOutputStream()"><b>getOutputStream</b></a>()
  <dd>  Returns an output stream for this socket.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getPort()"><b>getPort</b></a>()
  <dd>  Returns the value of this socket's <code>port</code> field.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#listen(int)"><b>listen</b></a>(int)
  <dd>  Sets the maximum queue length for incoming connection indications 
 (a request to connect) to the <code>count</code> argument.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setOption(int, java.lang.Object)"><b>setOption</b></a>(int, Object)
  <dd>  Enable/disable the option specified by <I>optID</I>.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Returns the address and port of this socket as a <code>String</code>.
</dl>
<a name="variables"></a>
<h2>
  <img src="images/variables.gif" width=153 height=38 alt="Variables">
</h2>
<a name="fd"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>fd</b>
<pre>
 protected <a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a> fd
</pre>
<dl>
  <dd> The file descriptor object for this socket.<p>
</dl>
<a name="address"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>address</b>
<pre>
 protected <a href="java.net.InetAddress.html#_top_">InetAddress</a> address
</pre>
<dl>
  <dd> The IP address of the remote end of this socket.<p>
</dl>
<a name="port"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>port</b>
<pre>
 protected int port
</pre>
<dl>
  <dd> The port number on the remote host to which this socket is connected.<p>
</dl>
<a name="localport"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a>
<b>localport</b>
<pre>
 protected int localport
</pre>
<dl>
  <dd> The local port number to which this socket is connected.<p>
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="SocketImpl"></a>
<a name="SocketImpl()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>SocketImpl</b>
<pre>
 public SocketImpl()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="create(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="create"><b>create</b></a>
<pre>
 protected abstract void create(boolean stream) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Creates either a stream or a datagram socket.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> stream - if <code>true</code>, create a stream socket;
                      otherwise, create a datagram socket.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs while creating the
               socket.
  </dl></dd>
</dl>
<a name="connect(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="connect"><b>connect</b></a>
<pre>
 protected abstract void connect(<a href="java.lang.String.html#_top_">String</a> host,
                                 int port) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Connects this socket to the specified port on the named host.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> host - the name of the remote host.
    <dd> port - the port number.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when connecting to the
               remote host.
  </dl></dd>
</dl>
<a name="connect(java.net.InetAddress, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="connect"><b>connect</b></a>
<pre>
 protected abstract void connect(<a href="java.net.InetAddress.html#_top_">InetAddress</a> address,
                                 int port) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Connects this socket to the specified port number on the specified host.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> address - the IP address of the remote host.
    <dd> port - the port number.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when attempting a
               connection.
  </dl></dd>
</dl>
<a name="bind(java.net.InetAddress, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="bind"><b>bind</b></a>
<pre>
 protected abstract void bind(<a href="java.net.InetAddress.html#_top_">InetAddress</a> host,
                              int port) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Binds this socket to the specified port number on the specified host.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> host - the IP address of the remote host.
    <dd> port - the port number.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when binding this socket.
  </dl></dd>
</dl>
<a name="listen(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="listen"><b>listen</b></a>
<pre>
 protected abstract void listen(int backlog) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Sets the maximum queue length for incoming connection indications 
 (a request to connect) to the <code>count</code> argument. If a 
 connection indication arrives when the queue is full, the 
 connection is refused.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> backlog - the maximum length of the queue.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when creating the queue.
  </dl></dd>
</dl>
<a name="accept(java.net.SocketImpl)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="accept"><b>accept</b></a>
<pre>
 protected abstract void accept(<a href="#_top_">SocketImpl</a> s) throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Accepts a connection.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> s - the accepted connection.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when accepting the
               connection.
  </dl></dd>
</dl>
<a name="getInputStream()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getInputStream"><b>getInputStream</b></a>
<pre>
 protected abstract <a href="java.io.InputStream.html#_top_">InputStream</a> getInputStream() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns an input stream for this socket.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a stream for reading from this socket.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when creating the
               input stream.
  </dl></dd>
</dl>
<a name="getOutputStream()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getOutputStream"><b>getOutputStream</b></a>
<pre>
 protected abstract <a href="java.io.OutputStream.html#_top_">OutputStream</a> getOutputStream() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns an output stream for this socket.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> an output stream for writing to this socket.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when creating the
               output stream.
  </dl></dd>
</dl>
<a name="available()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="available"><b>available</b></a>
<pre>
 protected abstract int available() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Returns the number of bytes that can be read from this socket
 without blocking.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the number of bytes that can be read from this socket
             without blocking.
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when determining the
               number of bytes available.
  </dl></dd>
</dl>
<a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="close"><b>close</b></a>
<pre>
 protected abstract void close() throws <a href="java.io.IOException.html#_top_">IOException</a>
</pre>
<dl>
  <dd> Closes this socket.
<p>
  <dd><dl>
    <dt> <b>Throws:</b> <a href="java.io.IOException.html#_top_">IOException</a>
    <dd> if an I/O error occurs when closing this socket.
  </dl></dd>
</dl>
<a name="getFileDescriptor()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getFileDescriptor"><b>getFileDescriptor</b></a>
<pre>
 protected <a href="java.io.FileDescriptor.html#_top_">FileDescriptor</a> getFileDescriptor()
</pre>
<dl>
  <dd> Returns the value of this socket's <code>fd</code> field.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the value of this socket's <code>fd</code> field.
    <dt> <b>See Also:</b>
    <dd> <a href="#fd">fd</a>
  </dl></dd>
</dl>
<a name="getInetAddress()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getInetAddress"><b>getInetAddress</b></a>
<pre>
 protected <a href="java.net.InetAddress.html#_top_">InetAddress</a> getInetAddress()
</pre>
<dl>
  <dd> Returns the value of this socket's <code>address</code> field.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the value of this socket's <code>address</code> field.
    <dt> <b>See Also:</b>
    <dd> <a href="#address">address</a>
  </dl></dd>
</dl>
<a name="getPort()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getPort"><b>getPort</b></a>
<pre>
 protected int getPort()
</pre>
<dl>
  <dd> Returns the value of this socket's <code>port</code> field.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the value of this socket's <code>port</code> field.
    <dt> <b>See Also:</b>
    <dd> <a href="#port">port</a>
  </dl></dd>
</dl>
<a name="getLocalPort()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getLocalPort"><b>getLocalPort</b></a>
<pre>
 protected int getLocalPort()
</pre>
<dl>
  <dd> Returns the value of this socket's <code>localport</code> field.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the value of this socket's <code>localport</code> field.
    <dt> <b>See Also:</b>
    <dd> <a href="#localport">localport</a>
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Returns the address and port of this socket as a <code>String</code>.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a string representation of this socket.
    <dt> <b>Overrides:</b>
    <dd> <a href="java.lang.Object.html#toString()">toString</a> in class <a href="java.lang.Object.html#_top_">Object</a>
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.net.html">This Package</a>  <a href="java.net.Socket.html#_top_">Previous</a>  <a href="java.net.URL.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
