net_connect*() contains now error parameter, so it can be used to properly

check the errno if connect() fails.

Added support for connecting to named UNIX sockets. Some cleanups with
session handling / server connecting as well.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2819 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-05-19 14:43:16 +00:00 committed by cras
commit 6f7485b8fa
13 changed files with 180 additions and 92 deletions

View file

@ -43,9 +43,11 @@ struct _IPADDR {
int net_ip_compare(IPADDR *ip1, IPADDR *ip2);
/* Connect to socket */
GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip);
GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip, int *error);
/* Connect to socket with ip address */
GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip);
GIOChannel *net_connect_ip(IPADDR *ip, int port, IPADDR *my_ip, int *error);
/* Connect to named UNIX socket */
GIOChannel *net_connect_unix(const char *path, int *error);
/* Disconnect socket */
void net_disconnect(GIOChannel *handle);
/* Try to let the other side close the connection, if it still isn't