summaryrefslogtreecommitdiff
path: root/src/core/network.h
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-12-04 22:57:18 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-12-04 22:57:18 +0000
commit1c9f45b4a41e5553c89393cd3228b8e8e9d6131b (patch)
tree2431f899730d091c2185e651184693d5f1853dce /src/core/network.h
parente81fdd730752012a3b34af443226f50d4771cc54 (diff)
downloadirssi-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/network.h')
-rw-r--r--src/core/network.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/core/network.h b/src/core/network.h
index 31817cdb..b1a0f6e2 100644
--- a/src/core/network.h
+++ b/src/core/network.h
@@ -33,24 +33,24 @@ typedef struct _ipaddr IPADDR;
int net_ip_compare(IPADDR *ip1, IPADDR *ip2);
/* Connect to socket */
-int net_connect(const char *addr, int port, IPADDR *my_ip);
+GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip);
/* Connect to socket with ip address */
-int net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip);
+GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip);
/* Disconnect socket */
-void net_disconnect(int handle);
+void net_disconnect(GIOChannel *handle);
/* Try to let the other side close the connection, if it still isn't
disconnected after certain amount of time, close it ourself */
-void net_disconnect_later(int handle);
+void net_disconnect_later(GIOChannel *handle);
/* Listen for connections on a socket */
-int net_listen(IPADDR *my_ip, int *port);
+GIOChannel *net_listen(IPADDR *my_ip, int *port);
/* Accept a connection on a socket */
-int net_accept(int handle, IPADDR *addr, int *port);
+GIOChannel *net_accept(GIOChannel *handle, IPADDR *addr, int *port);
/* Read data from socket, return number of bytes read, -1 = error */
-int net_receive(int handle, char *buf, int len);
+int net_receive(GIOChannel *handle, char *buf, int len);
/* Transmit data, return number of bytes sent, -1 = error */
-int net_transmit(int handle, const char *data, int len);
+int net_transmit(GIOChannel *handle, const char *data, int len);
/* Get IP address for host, returns 0 = ok,
others = error code for net_gethosterror() */
@@ -65,13 +65,13 @@ const char *net_gethosterror(int error);
int net_hosterror_notfound(int error);
/* Get socket address/port */
-int net_getsockname(int handle, IPADDR *addr, int *port);
+int net_getsockname(GIOChannel *handle, IPADDR *addr, int *port);
int net_ip2host(IPADDR *ip, char *host);
int net_host2ip(const char *host, IPADDR *ip);
/* Get socket error */
-int net_geterror(int handle);
+int net_geterror(GIOChannel *handle);
int is_ipv4_address(const char *host);
int is_ipv6_address(const char *host);