|
-
Nov 10th, 2006, 10:49 AM
#1
Thread Starter
Addicted Member
Socket question
I have a Server and a Client which communicate through a socket. The Server is a console application and the Client is an application which I have a JFrame for. I have a FClient class where I draw all the components on the form and stuff, and in the actionPerformed method , when I click a "connect" button, I call the default constructor from the Client class where I open the socket and I call some method from the Client class I use to comunicate with the server. The issue is the messages never get to the server, it hangs waiting to read something from the socket. I tried to use the Client class directly, and if I call it's contructor and methods they work, but for some reason it doesn't when I try to call them using the GUI.
I hope my question is clear enough, but if you need some code I can provide it here it my next post. Thank you.
-
Nov 11th, 2006, 08:00 AM
#2
Frenzied Member
Re: Socket question
Post the client and server portions of the code.
In the meantime, make sure both sockets are using the same port and use System.out.println statements in the catch clause to make sure an exception isn't being thrown.
EDIT: Just read your part about it not working with the GUI. It's possibly a multithreading issues, but can't say for sure without code.
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
|