[Mono-list] Re: full duplex sockets and threads

Robert Jordan robertj at gmx.net
Mon May 8 09:35:18 EDT 2006


Oleg Deribas wrote:
> Hello,
> 
> Robert Jordan said the following on 08.05.2006 15:50:
> 
>>> And what if I use asynchronous calls - BeginSend/BeginReceive?
>>> Should I provide some sort of my own synchronization mechanism then?
>> These are thread safe.
> 
> Thanks for your answer, it's great! There is another thing I would like
> to know - what if I will simultaneously call BeginSend several times
> from several different threads? Will these calls form some sort of
> internal queue and will they complete in the FIFO order? Or maybe I
> should create this queue myself and call each BeginSend only when
> previous call completed?

The requests will be queued, but you must take care about the
order of the BeginSend calls. Networks protocols often have
an inherent order that must be respected.

> And if so, will it be portable to microsoft's frameworks - 1.1 and 2.0?

Yes.

Robert



More information about the Mono-list mailing list