Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

question: can udp socket be used to write in different thread at the same time?

1 view
Skip to first unread message

hongx...@gmail.com

unread,
Jul 19, 2006, 7:46:15 PM7/19/06
to
Version: 5.5.2
host: windows xp sp2, suse linux enterprise server 9 sp2
compiler: vs.net 2003, gcc 3.3.3

I know a handle of tcp socket can not be used to write in different
threads at the same time.
but can a handle of udp socket ?(because it sends in an unit of an
entire packet, I think it can, right?)

Douglas C. Schmidt

unread,
Jul 19, 2006, 8:08:27 PM7/19/06
to hongx...@gmail.com, ace-...@cse.wustl.edu
Hi,

Thanks for using the PRF.

In theory, this should work because UDP is an "atomic" protocol. In
practice, however, there might be bugs in some operating systems and
or OS versions that might make this fail in some situations, so I
could experiment carefully with Windows and Linux to see if they do
indeed work properly.

Take care,

Doug


--
Dr. Douglas C. Schmidt Professor and Associate Chair
Electrical Engineering and Computer Science TEL: (615) 343-8197
Vanderbilt University WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203 NET: d.sc...@vanderbilt.edu

0 new messages