Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
[#70] io/channel-watch.c: Correctly associate socket handle with its …
Browse files Browse the repository at this point in the history
…corresponding event. (#71)

Add WSAEventSelect() for Windows.
  • Loading branch information
zaq32 authored and ilg-ul committed Jun 28, 2019
1 parent 7d669c3 commit 586ea44
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions io/channel-watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,12 @@ GSource *qio_channel_create_socket_watch(QIOChannel *ioc,
GSource *source;
QIOChannelSocketSource *ssource;

#ifdef WIN32
WSAEventSelect(socket, ioc->event,
FD_READ | FD_ACCEPT | FD_CLOSE |
FD_CONNECT | FD_WRITE | FD_OOB);
#endif

source = g_source_new(&qio_channel_socket_source_funcs,
sizeof(QIOChannelSocketSource));
ssource = (QIOChannelSocketSource *)source;
Expand Down

0 comments on commit 586ea44

Please sign in to comment.