This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Socket connection problem