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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user