Remove the TAP-Win32 reader thread.
tinc is using a separate thread to read from the TAP device on Windows. The rationale was that the notification mechanism for packets arriving on the virtual network device is based on Win32 events, and the event loop did not support listening to these events. Thanks to recent improvements, this event loop limitation has been lifted. Therefore we can get rid of the separate thread and simply add the Win32 "incoming packet" event to the event loop, just like a socket. The result is cleaner code that's easier to reason about.
This commit is contained in:
parent
ffbc99558c
commit
313a752cb5
5 changed files with 32 additions and 57 deletions
|
|
@ -203,8 +203,6 @@ extern void load_all_nodes(void);
|
|||
|
||||
#ifndef HAVE_MINGW
|
||||
#define closesocket(s) close(s)
|
||||
#else
|
||||
extern CRITICAL_SECTION mutex;
|
||||
#endif
|
||||
|
||||
#endif /* __TINC_NET_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue