summaryrefslogtreecommitdiff
path: root/agni.c
diff options
context:
space:
mode:
Diffstat (limited to 'agni.c')
-rw-r--r--agni.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/agni.c b/agni.c
index c1ac68f..a2f14a4 100644
--- a/agni.c
+++ b/agni.c
@@ -23,6 +23,9 @@
#include "buf.h"
#include "mq_cmd.h"
#include "tbl_qcmd.h"
+#include "util.h"
+#include "sock_conn.h"
+#include "irc_parse.h"
/*
no defence programming, no error checking, no argument checking just PoC
@@ -31,24 +34,6 @@ nothing else
#define MQ_MSG_SIZE 8192
-/*
-return fd!=ifconnection there
-*/
-int irc_connect( char *hostname, char *port )
-{
- int fd=0;
-
- struct addrinfo serv, *res;
-
- memset(&serv, 0, sizeof(serv));
- serv.ai_family = AF_INET;
- serv.ai_socktype = SOCK_STREAM;
- getaddrinfo(hostname, port, &serv, &res);
- fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
- connect(fd, res->ai_addr, res->ai_addrlen);
-
- return fd;
-}
/*
return unique ID, with atomic counter should work in all cases