API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.net. SocketImpl View Source
Author(s)
unascribed
Since
JDK1.0
Version
1.45, 03/08/07
Serial
Hierarchy
 Object
      SocketImpl
Implements
 SocketOptions
Subclasses
Description
publicabstract abstract class SocketImpl
  The abstract class SocketImpl is a common superclass of all classes that actually implement sockets.
See also:   
Constructors
public SocketImpl ()
Methods
Hide/Show inherited methods
protectedabstract void accept (SocketImpl s) throws IOException
  Accepts a connection.
protectedabstract int available () throws IOException
  Returns the number of bytes that can be read from this socket without blocking.
protectedabstract void bind (InetAddress host, int port) throws IOException
  Binds this socket to the specified local IP address and port number.
protectedabstract void close () throws IOException
  Closes this socket.
protectedabstract void connect (InetAddress address, int port) throws IOException
  Connects this socket to the specified port number on the specified host.
protectedabstract void connect (SocketAddress address, int timeout) throws IOException
  Connects this socket to the specified port number on the specified host.
protectedabstract void connect (String host, int port) throws IOException
  Connects this socket to the specified port on the named host.
protectedabstract void create (boolean stream) throws IOException
  Creates either a stream or a datagram socket.
protected FileDescriptor getFileDescriptor ()
  Returns the value of this socket's fd field.
protected InetAddress getInetAddress ()
  Returns the value of this socket's address field.
protectedabstract InputStream getInputStream () throws IOException
  Returns an input stream for this socket.
protected int getLocalPort ()
  Returns the value of this socket's localport field.
protectedabstract OutputStream getOutputStream () throws IOException
  Returns an output stream for this socket.
protected int getPort ()
  Returns the value of this socket's port field.
pack-private ServerSocket getServerSocket ()
pack-private Socket getSocket ()
protectedabstract void listen (int backlog) throws IOException
  Sets the maximum queue length for incoming connection indications (a request to connect) to the count argument.
pack-private void reset () throws IOException
protectedabstract void sendUrgentData (int data) throws IOException
  Send one byte of urgent data on the socket.
protected void setPerformancePreferences (int connectionTime, int latency, int bandwidth)
  Sets performance preferences for this socket.
pack-private void setServerSocket (ServerSocket soc)
pack-private void setSocket (Socket soc)
protected void shutdownInput () throws IOException
  Places the input stream for this socket at "end of stream".
protected void shutdownOutput () throws IOException
  Disables the output stream for this socket.
protected boolean supportsUrgentData ()
  Returns whether or not this SocketImpl supports sending urgent data.
public String toString ()
  Returns the address and port of this socket as a String.
Fields
Hide/Show inherited fields
protected InetAddress address
The IP address of the remote end of this socket.
protected FileDescriptor fd
The file descriptor object for this socket.
publicfinalstatic int IP_MULTICAST_IF = "16" [Inherited From SocketOptions]
  Set which outgoing interface on which to send multicast packets.
publicfinalstatic int IP_MULTICAST_IF2 = "31" [Inherited From SocketOptions]
  Same as above.
publicfinalstatic int IP_MULTICAST_LOOP = "18" [Inherited From SocketOptions]
  This option enables or disables local loopback of multicast datagrams.
publicfinalstatic int IP_TOS = "3" [Inherited From SocketOptions]
  This option sets the type-of-service or traffic class field in the IP header for a TCP or UDP socket.
protected int localport
The local port number to which this socket is connected.
protected int port
The port number on the remote host to which this socket is connected.
pack-private ServerSocket serverSocket
publicfinalstatic int SO_BINDADDR = "15" [Inherited From SocketOptions]
  Fetch the local address binding of a socket (this option cannot be "set" only "gotten", since sockets are bound at creation time, and so the locally bound address cannot be changed).
publicfinalstatic int SO_BROADCAST = "32" [Inherited From SocketOptions]
  Sets SO_BROADCAST for a socket.
publicfinalstatic int SO_KEEPALIVE = "8" [Inherited From SocketOptions]
  When the keepalive option is set for a TCP socket and no data has been exchanged across the socket in either direction for 2 hours (NOTE: the actual value is implementation dependent), TCP automatically sends a keepalive probe to the peer.
publicfinalstatic int SO_LINGER = "128" [Inherited From SocketOptions]
  Specify a linger-on-close timeout.
publicfinalstatic int SO_OOBINLINE = "4099" [Inherited From SocketOptions]
  When the OOBINLINE option is set, any TCP urgent data received on the socket will be received through the socket input stream.
publicfinalstatic int SO_RCVBUF = "4098" [Inherited From SocketOptions]
  Set a hint the size of the underlying buffers used by the platform for incoming network I/O.
publicfinalstatic int SO_REUSEADDR = "4" [Inherited From SocketOptions]
  Sets SO_REUSEADDR for a socket.
publicfinalstatic int SO_SNDBUF = "4097" [Inherited From SocketOptions]
  Set a hint the size of the underlying buffers used by the platform for outgoing network I/O.
publicfinalstatic int SO_TIMEOUT = "4102" [Inherited From SocketOptions]
  Set a timeout on blocking Socket operations:
pack-private Socket socket
The actual Socket object.
publicfinalstatic int TCP_NODELAY = "1" [Inherited From SocketOptions]
  Disable Nagle's algorithm for this connection.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar