Class java.net.SocketImpl
All Packages  Class Hierarchy  This Package  Previous  Next  Index
Class java.net.SocketImpl 
java.lang.Object
|
   +----java.net.SocketImpl
- public class SocketImpl - extends Object 
This is the Socket implementation class. It is an
abstract class that must be subclassed to provide
an actual implementation.
 
 
 address address
- The internet address where the socket will make a connection. 
 fd fd
- The file descriptor object 
 localport localport
 port port
- The port where the socket will make a connection. 
 
 
 SocketImpl() SocketImpl()
 
 
 accept(SocketImpl) accept(SocketImpl)
- Accepts a connection. 
 available() available()
- Returns the number of bytes that can be read without blocking. 
 bind(InetAddress, int) bind(InetAddress, int)
- Binds the socket to the specified port on the specified host. 
 close() close()
- Closes the socket. 
 connect(InetAddress, int) connect(InetAddress, int)
- Connects the socket to the specified address on the specified
port. 
 connect(String, int) connect(String, int)
- Connects the socket to the specified port on the specified host. 
 create(boolean) create(boolean)
- Creates a socket with a boolean that specifies whether this
is a stream socket or a datagram socket. 
 getFileDescriptor() getFileDescriptor()
 getInetAddress() getInetAddress()
 getInputStream() getInputStream()
- Gets an InputStream for this socket. 
 getLocalPort() getLocalPort()
 getOutputStream() getOutputStream()
- Gets an OutputStream for this socket. 
 getPort() getPort()
 listen(int) listen(int)
- Specify to the system how many connection requests the system
will queue up while waiting for the SocketImpl to execute accept(). 
 toString() toString()
- Returns the address and port of this Socket as a String. 
 
 
 fd
 fd 
protected FileDescriptor fd
- The file descriptor object 
 address
 address 
protected InetAddress address
- The internet address where the socket will make a connection. 
 port
 port 
protected int port
- The port where the socket will make a connection. 
 localport
 localport 
protected int localport
 
 
 SocketImpl
 SocketImpl 
public SocketImpl()
 
 
 create
 create 
protected abstract void create(boolean stream) throws IOException
- Creates a socket with a boolean that specifies whether this
is a stream socket or a datagram socket. - Parameters: 
- stream - a boolean indicating whether this is a stream
or datagram socket 
 
 connect
 connect 
protected abstract void connect(String host,
                                  int port) throws IOException
- Connects the socket to the specified port on the specified host. - Parameters: 
- host - the specified host of the connection - port - the port where the connection is made 
 
 connect
 connect 
protected abstract void connect(InetAddress address,
                                  int port) throws IOException
- Connects the socket to the specified address on the specified
port. - Parameters: 
- address - the specified address of the connection - port - the specified port where connection is made 
 
 bind
 bind 
protected abstract void bind(InetAddress host,
                               int port) throws IOException
- Binds the socket to the specified port on the specified host. - Parameters: 
- host - the host - port - the port 
 
 listen
 listen 
protected abstract void listen(int backlog) throws IOException
- Specify to the system how many connection requests the system
will queue up while waiting for the SocketImpl to execute accept(). - Parameters: 
- backlog - the number of queued connect requests pending accept 
 
 accept
 accept 
protected abstract void accept(SocketImpl s) throws IOException
- Accepts a connection. - Parameters: 
- s - the accepted connection 
 
 getInputStream
 getInputStream 
protected abstract InputStream getInputStream() throws IOException
- Gets an InputStream for this socket. 
 getOutputStream
 getOutputStream 
protected abstract OutputStream getOutputStream() throws IOException
- Gets an OutputStream for this socket. 
 available
 available 
protected abstract int available() throws IOException
- Returns the number of bytes that can be read without blocking. 
 close
 close 
protected abstract void close() throws IOException
- Closes the socket. 
 getFileDescriptor
 getFileDescriptor 
protected FileDescriptor getFileDescriptor()
 getInetAddress
 getInetAddress 
protected InetAddress getInetAddress()
 getPort
 getPort 
protected int getPort()
 getLocalPort
 getLocalPort 
protected int getLocalPort()
 toString
 toString 
public String toString()
- Returns the address and port of this Socket as a String. - Overrides: 
- toString in class Object 
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index