]> git.meshlink.io Git - meshlink/blobdiff - src/event.c
Flush output buffers in the tap reader thread on Windows.
[meshlink] / src / event.c
index 6b730f6d153de426eb1f919638c590c626f3328c..095e7c33df25d369c8a7d241b970c0286554ac6a 100644 (file)
@@ -245,6 +245,12 @@ bool event_loop(void) {
        return true;
 }
 
+void event_flush_output(void) {
+       for splay_each(io_t, io, &io_tree)
+               if(FD_ISSET(io->fd, &writefds))
+                       io->cb(io->data, IO_WRITE);
+}
+
 void event_exit(void) {
        running = false;
 }