Meaningless Drivel is fun!*
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket connection problem" Watch "Socket connection problem" New topic

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:
subject: Socket connection problem
Similar Threads
connectionless socket
WA #1.....word association
secure web based mail
What's merit and demerit of Socket Connection?
How to know whenever my system connects to internet?