From f43873dc5fc845d4a195ea8b2328fcc9ae3565b1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 19 Sep 2011 20:40:33 +0200 Subject: tcp_socket, udp_server: use g_io_channel_new_socket() --- src/tcp_socket.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/tcp_socket.c') diff --git a/src/tcp_socket.c b/src/tcp_socket.c index f65b9c07c..b64796fe6 100644 --- a/src/tcp_socket.c +++ b/src/tcp_socket.c @@ -20,6 +20,7 @@ #include "tcp_socket.h" #include "fifo_buffer.h" #include "io_thread.h" +#include "glib_socket.h" #include #include @@ -317,11 +318,7 @@ tcp_socket_new(int fd, g_mutex_lock(s->mutex); -#ifndef G_OS_WIN32 - s->channel = g_io_channel_unix_new(fd); -#else - s->channel = g_io_channel_win32_new_socket(fd); -#endif + s->channel = g_io_channel_new_socket(fd); /* GLib is responsible for closing the file descriptor */ g_io_channel_set_close_on_unref(s->channel, true); /* NULL encoding means the stream is binary safe */ -- cgit v1.2.3