RE: Read from and Write to the same socket from two threads
- From: wawang@xxxxxxxxxxxxxxxxxxxx ("Walter Wang [MSFT]")
- Date: Tue, 05 Feb 2008 06:59:21 GMT
Hi Charles,
While calling send() in one thread and recv() in another thread is safe,
order of winsock functions in two threads on one socket handle might cause
other issues. It's recommended to provide thread safety yourself. Please
see winsock FAQ on this:
Winsock Programmer's FAQ: Intermediate Winsock Issues
(http://tangentsoft.net/wskfaq/intermediate.html#threadsafety)
Hope this helps.
Regards,
Walter Wang (wawang@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- Re: Read from and Write to the same socket from two threads
- From: Charles Zhang
- Re: Read from and Write to the same socket from two threads
- References:
- Read from and Write to the same socket from two threads
- From: Charles Zhang
- Read from and Write to the same socket from two threads
- Prev by Date: Re: Read from and Write to the same socket from two threads
- Next by Date: Re: Read from and Write to the same socket from two threads
- Previous by thread: Re: Read from and Write to the same socket from two threads
- Next by thread: Re: Read from and Write to the same socket from two threads
- Index(es):
Relevant Pages
|