client: use GLib's win32 IO channel on WIN32

Use g_io_channel_win32_new_socket() instead of g_io_channel_unix_new()
on WIN32.
This commit is contained in:
Max Kellermann 2009-01-25 19:40:10 +01:00
parent 808a369ca8
commit b0ea975642
1 changed files with 5 additions and 0 deletions

View File

@ -184,7 +184,12 @@ static void client_init(struct client *client, int fd)
client->bufferPos = 0;
client->fd = fd;
#ifndef G_OS_WIN32
client->channel = g_io_channel_unix_new(client->fd);
#else
client->channel = g_io_channel_win32_new_socket(client->fd);
#endif
client->source_id = g_io_add_watch(client->channel, G_IO_IN,
client_in_event, client);