*
The moose likes Sockets and Internet Protocols and the fly likes Socket connection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket connection problem" Watch "Socket connection problem" New topic
Author

Socket connection problem

Arun Prasath
Ranch Hand

Joined: Jul 18, 2006
Posts: 60
Socket s=new Socket(i,1024);

it gives ConnectException and says connection refuses.
how can it be cleared?
Petrus Pelser
Ranch Hand

Joined: Feb 20, 2006
Posts: 132
What is i's type and value?
Chris Beckey
Ranch Hand

Joined: Jun 09, 2006
Posts: 116

Most likely it means that the host at "i" is not listening on the specified port (1024).
 
Consider Paul's rocket mass heater.
 
subject: Socket connection problem
 
Similar Threads
secure web based mail
What's merit and demerit of Socket Connection?
WA #1.....word association
How to know whenever my system connects to internet?
connectionless socket