All About Class SocketImpl in Java


The abstract class SocketImpl is a common super class of classes that actually implements sockets.It is used to create both client and server sockets.A plain socket implements these methods exactly as described without attempting to go through a firewall or proxy.

The structure of the class SocketImpl is given as:

public abstract class java.net.SocketImpl extends java.lang.Object{
//member elements
protected InetAddress address;// the IP address of the remote end of the socket.
protected FileDescriptor fd;//the file descriptor object for this socket.
protected int localPort;// the local port to which this socket is connected.
protected int port;// the port number on which the remote machine (hos)to which this socket is connected.
//constructor
public SocketImpl();
//the default constructor for a socket implementation.
//method
protected abstract void accept(SocketImpl s);
protected abstract int available();
protected abstract void bind(InetAddress host,int port);
protected abstract void close();
protected abstract void conect(InetAddress address,int port);
protected abstract void conect(String host,int port);
protected abstract void create(boolean stream);
protected FileDescriptor getFileDescriptor();
protected InetAddress getInetAddress();
protected int getLocalPort();
protected int getPort();
protected abstract InputStream getInputStream();
protected abstract OutputStream getOutputStream();
protected abstract void listen(int count);
public String toString();
}
 
All About Class SocketImpl in Java All About Class SocketImpl in Java Reviewed by Animesh Chatterjee on October 12, 2018 Rating: 5

No comments:

Powered by Blogger.