Reputation: 121
I am trying to make a simple socket to my loopback address -
Socket socket = new Socket("127.0.0.1", 4424);
when i get this exception. How do i resolve it?
Upvotes: 0
Views: 113
Reputation: 26926
Have you a socket server listening on port 4424?
You are creating a socket client. It can communicate only with a running socket server on the same port.
If you like you can create a server in java using the ServerSocket
class.
Upvotes: 3
Reputation: 517
Your socket server is not listening to localhost.Make sure that u have socket server on ur machine nd if not please download it .
Upvotes: 0