Add windows support (#707)

Co-authored-by: acalcutt <acalcutt@techidiots.net>
Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
Co-authored-by: Ovidiu Voda <ovi.voda@gmail.com>
This commit is contained in:
tdcosta100
2023-02-25 21:12:06 +00:00
committed by GitHub
parent 23cba4ba08
commit f06f60803c
34 changed files with 2371 additions and 92 deletions

View File

@@ -162,7 +162,11 @@ void RunLoop::addWatch(int fd, Event event, std::function<void(int, Event)>&& ca
watch = watchPtr.get();
impl->watchPoll[fd] = std::move(watchPtr);
#ifdef WIN32
if (uv_poll_init_socket(impl->loop, &watch->poll, fd)) {
#else
if (uv_poll_init(impl->loop, &watch->poll, fd)) {
#endif
throw std::runtime_error("Failed to init poll on file descriptor.");
}
} else {