diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-04 22:57:18 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-04 22:57:18 +0000 |
commit | 1c9f45b4a41e5553c89393cd3228b8e8e9d6131b (patch) | |
tree | 2431f899730d091c2185e651184693d5f1853dce /src/core/net-sendbuffer.c | |
parent | e81fdd730752012a3b34af443226f50d4771cc54 (diff) | |
download | irssi-1c9f45b4a41e5553c89393cd3228b8e8e9d6131b.zip |
Use GIOChannel instead of sockets directly. Helps porting to win32 :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@962 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/net-sendbuffer.c')
-rw-r--r-- | src/core/net-sendbuffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/net-sendbuffer.c b/src/core/net-sendbuffer.c index 2c11fd4f..c2b0d45c 100644 --- a/src/core/net-sendbuffer.c +++ b/src/core/net-sendbuffer.c @@ -24,7 +24,7 @@ #include "net-sendbuffer.h" struct _NET_SENDBUF_REC { - int handle; + GIOChannel *handle; int bufsize; int bufpos; @@ -36,11 +36,11 @@ static int timeout_tag; /* Create new buffer - if `bufsize' is zero or less, DEFAULT_BUFFER_SIZE is used */ -NET_SENDBUF_REC *net_sendbuffer_create(int handle, int bufsize) +NET_SENDBUF_REC *net_sendbuffer_create(GIOChannel *handle, int bufsize) { NET_SENDBUF_REC *rec; - g_return_val_if_fail(handle != -1, NULL); + g_return_val_if_fail(handle != NULL, NULL); rec = g_new0(NET_SENDBUF_REC, 1); rec->handle = handle; @@ -148,9 +148,9 @@ int net_sendbuffer_send(NET_SENDBUF_REC *rec, const void *data, int size) } /* Returns the socket handle */ -int net_sendbuffer_handle(NET_SENDBUF_REC *rec) +GIOChannel *net_sendbuffer_handle(NET_SENDBUF_REC *rec) { - g_return_val_if_fail(rec != NULL, -1); + g_return_val_if_fail(rec != NULL, NULL); return rec->handle; } |