What is a ServerSocket?

java.net.ServerSocket A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester.Click to see full answer. Just so, what is ServerSocket in Java?ServerSocket class represents a server socket. It is constructed on a particular port. Then it…

java.net.ServerSocket A server socket waits for requests to come in over the network. It performs some operation based on that request, and then possibly returns a result to the requester.Click to see full answer. Just so, what is ServerSocket in Java?ServerSocket class represents a server socket. It is constructed on a particular port. Then it calls accept() to listen for incoming connections. accept() blocks until a connection is detected. On a server with multiple IP addresses, the getInetAddress() method tells you which one this server socket is listening to. what is use of socket and ServerSocket? Java Socket programming is used for communication between the applications running on different JRE. Socket and ServerSocket classes are used for connection-oriented socket programming and DatagramSocket and DatagramPacket classes are used for connection-less socket programming. Beside this, what is difference between socket () and ServerSocket () class? Difference between a Socket and a ServerSocket. Socket class is meant for client side, so in a client side u need to make a object of Socket class for any networking application, whereas for server side networking application ServerSocket class is used, in this class method named as serversocket_object.Which methods are commonly used in ServerSocket class?public Socket accept() method are commonly used in ServerSocket class – Java. Q.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.