469,909 Members | 1,815 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,909 developers. It's quick & easy.

Reading and Writing from same network stream

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
Jul 21 '05 #1
1 2411
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?

--
William Stacey, MVP

"John" <no****@SendNoSpamToMe.com> wrote in message
news:uR**************@tk2msftngp13.phx.gbl...
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


Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Ali | last post: by
21 posts views Thread by JoKur | last post: by
3 posts views Thread by Adman | last post: by
3 posts views Thread by Alex Clark | last post: by
3 posts views Thread by Sir Psycho | last post: by
10 posts views Thread by puzzlecracker | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.