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

Commit 586ea44

Browse files
zaq32ilg-ul
authored andcommitted
[#70] io/channel-watch.c: Correctly associate socket handle with its corresponding event. (#71)
Add WSAEventSelect() for Windows.
1 parent 7d669c3 commit 586ea44

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

io/channel-watch.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,12 @@ GSource *qio_channel_create_socket_watch(QIOChannel *ioc,
285285
GSource *source;
286286
QIOChannelSocketSource *ssource;
287287

288+
#ifdef WIN32
289+
WSAEventSelect(socket, ioc->event,
290+
FD_READ | FD_ACCEPT | FD_CLOSE |
291+
FD_CONNECT | FD_WRITE | FD_OOB);
292+
#endif
293+
288294
source = g_source_new(&qio_channel_socket_source_funcs,
289295
sizeof(QIOChannelSocketSource));
290296
ssource = (QIOChannelSocketSource *)source;

0 commit comments

Comments
 (0)