Skip to content
Advertisement

Tag: client-server

how to implement ByteArrayOutputStream?

I need help with implementing an byteArrayOutputStream that stores the output from the server, which I can then read from and print. Does anyone know how to do this? Any help would be much appreciated. TCPAsk: Edit: my code is now working and it is similar to the answer (TCPClient) given below with some minor additions. ByteArrayOutputStream is not needed.

Java Chat Multi-Client Receiving thread

In a lot of multclient java programs people use a separate thread which only receives the messages from the server. Is it really necessary? Why can’t it be done in the main thread? What should be the problem? For me a separate thread to receive the messages from the server is not that necessary, it could be done simply be

Advertisement