![]() |
| | #1 |
| Registered User Join Date: Jul 2006
Posts: 63
| are winsock functions thread safe? |
| *DEAD* is offline | |
| | #2 |
| Registered User Join Date: Mar 2003
Posts: 3,894
| What do you mean? Are you using the same socket in multiple threads? gg |
| Codeplug is offline | |
| | #3 |
| Super Moderator Join Date: Aug 2001
Posts: 7,811
| If you are using blocking sockets then not really. The blocking socket will sit there until something happens which is never good for a thread. But besides that yes sockets are safe. I've got a server running in a thread which then fires off more threads to serve the connections and it works just fine. I would not recommend attempting to share a socket acrossed a thread though. |
| Bubba is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C thread functions? | audinue | C Programming | 3 | 07-08-2008 07:47 AM |
| Where do I initialize Winsock and catch messages for it? | Lithorien | Windows Programming | 10 | 12-30-2004 12:11 PM |
| Win32 Thread Object Model Revisted | Codeplug | Windows Programming | 5 | 12-15-2004 08:50 AM |
| injecting my own thread into the address space of another process - cannot call any f | Andrew_5342 | Windows Programming | 12 | 05-17-2003 05:58 AM |
| API "Clean Up" Functions & delete Pointers :: Winsock | kuphryn | Windows Programming | 2 | 05-10-2002 06:53 PM |