wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes Socket constructor error 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 constructor error" Watch "Socket constructor error" New topic

Socket constructor error

justin mcsporran

Joined: May 12, 2003
Posts: 15
When I compile the appended class, I get the following error:

The code is:

Thanks in advance for any help,
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
java.net.Socket does not have a constructor that accepts two Strings for host and port. It does have a constructor that accepts a String host and int port. So change


and it should work.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link: http://aspose.com/file-tools
subject: Socket constructor error
Similar Threads
Accessing FTP Server using Java
Chat At Server Part Both write and read at the same time?
the max number of clients to multithread the socket server
Make it in Applet, please.....urgent please....
Relay access denied