I have PublicChat class and PublicChatSocks class.

PublicChat class is responsible to take care of the GUI. It is responsible
of receiving data from the datastreams.
PublicChatSocks class is responsible to take care of the socket connection,
datastreams as well as sending data.

I found this quite difficult to do. Both classes are using Threads/Runnable
to perform the tasks.

My PublicChatServer is running. When I try to connect PublicChat to the
PublicChatServer, the client just stops processing any further. I don't get
any exception errors or anything.

I'm using ObjectOutputStream/InputStream.

In another area, I have a LoginWindow that accepts the login details from
the user and sends it to the server for authentication. I plan to use SQL
strings to check if the user and password is valid in the mySQL database,
using the SQL statement "select * from user where username='"username"' and

1. Should I combine both the PublicChat and PublicChatSocks classes into a
class so that I can immediately update the textarea or should I maintain the
two classes?
2. What can be wrong with the connections? Why my client appears to be
3. If the authentication server is multi-threaded, will it checks each
connection individually, or will it broadcast to every clients?
4. If the authentication server replies to the client that connects to it at
that particular thread, how to write so that the server flushes the login
status back to the client?



Best Regards,
Wing Hoe
ICQ: 2213281
Email: winghoe@hotmail.com
www: http://pwp.maxis.net.my/winghoe