Ques : What is Java.net.ServerSocket ?

, , No Comments

 Constructors:

public ServerSocket(int port): creates a server socket on a specified port with a queue
length of 50. A port number 0 creates a socket on any free port.

public ServerSocket(int port, int QueLen): creates a server socket on a specified port
with a queue length of QueLen.

public ServerSocket(int port, int QueLen, InetAddress localAdd): creates a server
socket on a specified port with a queue length specified by QueLet.On a multihomed
host, locaAdd specifies the IP address to which this socket binds.

Methods:
public Socket accept(): listens for a connection to be made to this socket and accepts
it. public void close():closes the socket.

0 टिप्पणियाँ:

Post a Comment