File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket Connection Problem" Watch "Socket Connection Problem" New topic
Author

Socket Connection Problem

sam sawant
Greenhorn

Joined: Mar 26, 2009
Posts: 12

in my program
i want ipaddress & port number to be entered by the user in text fields. this values should passed to socket connection

what i did
ipaddress=tf1.gettext()
port_no.=tf2.gettext()

& then

Socket s=new socket(ipaddress,port_no);


but this doesn't work....so do help me out......
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39551
    
  27
You didn't say how it doesn't work, but in any case there is no Socket (String, String) constructor. You need to use an int for the port number. If that's not the problem you're facing, TellTheDetails of what is the problem.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Socket Connection Problem
 
Similar Threads
about tomcat
java socket connection timeout taking more time when running in unix
Brio Report ReportMartException
Anyway to speedup TCP connection?
Client Failed to connect, how do I attempt a reconnect?