Yes, you should be able to have a read and write operation outstanding on
the socket at the same time.
--
feroze
-----------------
This posting is provided as-is. It offers no warranties and assigns no
rights.
See
http://weblogs.asp.net/feroze_daud for System.Net related posts.
----------------
"Altramagnus" <(E-Mail Removed)> wrote in message
news:4292f73f$(E-Mail Removed)...
>I have wrote software that do that b4 in both java and C#.
>
> For java, socket is not thread safe. When 1 thread tries to read from a
> socket ( in block mode ), while the oother thread
> tries to write to it, sometimes it will coz error. ( For UDP, did not try
> for TCP )
>
> For C#, according to the MSDN doc, it is not meant to be thread safe,
> however,
> so far i have not encounter any error. ( For TCP, did not try for UDP )
>
> Conclusion I got is, no, socket is not thread safe.
> But for C#, since i have not encounter any problem, I took the risk.
>
>
>
> "Cool Guy" <(E-Mail Removed)> wrote in message
> news:1v6neunzyn6lw$.(E-Mail Removed)...
>>I wrote:
>>
>>> Is it possible for one thread to perform a blocking read on a socket
>>> while
>>> another thread performs a blocking write on it?
>>>
>>> I'm about to start writing an IRC client and I'm considering having a
>>> thread in which all the reading from the socket takes place, and another
>>> thread in which all the writing to the socket takes place.
>>>
>>> Is this thread-safe, etc.?
>>
>> *cross-posting to the more populated C# language group, in hope of a
>> response from there*
>
>