I have a main MessServ class which extends thread and listens for connections to the server.
I have a MessConn class which extends thread and listens to messages sent from a client.
I have a MessClient class which will send input to the MessConn which echos it back to the client.
My question is, how do I make it so that if I have multiple clients connected to the server, if 1 client sends a message, the other client will see it? How do I make the 2 connection threads communicate with each other.
Through the Main MessServ?
I cant see how to do that when the MessServ code waits at…
mConn[cCnt] = new MessConn(servSock.accept(),cCnt);
So theres no way for me to get the message from 1 client and send it to the other.
Any help would be greatly appreciated!!