|
-
May 12th, 2000, 12:14 PM
#1
Applet + Network Socket
Hi,
I have some problems with my program, maybe somebody knows a solution :
I wrote an Client Server Applikation with Sockets. All my Code worked perfect.
Then I take this working code and place it into an applet. But know the client doesnt find the server ? I also get no Exception. The Client programm waits at following line :
client = new Socket(InetAddress.getByName("168.192.192.123"),5000);
You see I try to connect to a Server (it's the same computer) The Server is also running and listening on port 5000.
But nothing happens ? What shall I do ?
Martin
-
May 12th, 2000, 12:24 PM
#2
Re: Applet + Network Socket
Try like this :
client = new Socket( applet.getCodeBase().getHost() , 5000 );
Poochi..
-
May 14th, 2000, 09:53 AM
#3
Re: Applet + Network Socket
I tried this out, but it doesnt work ?
The statement you mentioned return a "" String. So do I need a Web Server (e.g. Apache ) running on my local machine to test the applet ?
Martin
-
May 15th, 2000, 01:12 PM
#4
Re: Applet + Network Socket
Hi,
I tried this all out and,you have to install a Web Server 
After I installed a Apache on my Windows, this all works 
Martin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|