Hello everyone I would like to know exactly what would happen if a message was sent to a socket whilst a client was sending to the socket. Would there be socket exceptions on both side (client and server) if so would it still be possible to recieve what was sent before the server tried to send or are both messages lost.
Roy Ben Ami
Joined: Jan 13, 2002
i dont se any problem with this. usually a socket at either side will be endless loop listening for object or strings. the same socket can write send also data at the same time.
Joined: Apr 15, 2002
There are two streams in a socket. One is InputStream for read, the other is OutputStream for write. So no exception is thrown.
Joined: Jun 02, 2002
There would be no exception thrown.But if u have problems related to what actually is going on then create two threads one for sending and one for receiving . pass the address of this socket in both the threads . Now using this u can handle what u are seding and receiving differently .
"Hain aur bhee duniya mein sukhanwar bahut acche.<br />Kehte hein ke Galib ka hai andaz-e-bayaan aur."