Reading and Writing from same network stream

  • Thread starter Thread starter John
  • Start date Start date
J

John

I have a Socket open to a target system. I get the network stream from the
open socket and then create a stream reader and stream writer on this
stream. The stream reader and writers are operating on different threads.

Does anyone know if it is possible to read and write to the same stream
using two different streaming object as mentioned here.

John
 
I know you can read on one thread and write on another to same socket.
However, I don't think you can "reliabably" read and write in each thread to
same socket. You don't need to share the stream, create another writer
steam on the other thread to same socket for write only. Does that help?
 
Back
Top