Home » serversocket

Tag Archives: serversocket

java.net.ConnectException – How to solve Connect Exception

In this example we are going to discuss about one of the most common exceptions you will come across when dealing with network programming in Java: ConnectException. ConnectException is a subclass of SocketException, and that alone reveals that it is meant to inform you about an error that occurred when you tried to create or access a socket. To be ...

Read More »

Create Server Socket

This is an example of how to create a 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. Creating a server socket implies that you should: Create a ServerSocket, bound to a specified port. Use accept() API method to ...

Read More »