comparison libnnchat.h @ 62:ff5d74f0d428

Moved some functions to "libnnchat".
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Nov 2008 21:57:51 +0200
parents
children 6a3a917303e4
comparison
equal deleted inserted replaced
61:b802a799c31a 62:ff5d74f0d428
1 /*
2 * NNChat - Custom chat client for NewbieNudes.com chatrooms
3 * Written by Matti 'ccr' Hämäläinen
4 * (C) Copyright 2008 Tecnic Software productions (TNSP)
5 */
6 #ifndef LIBNNCHAT_H
7 #define LIBNNCHAT_H
8
9 #include <stdio.h>
10 #include <unistd.h>
11 #include <sys/socket.h>
12 #include <sys/types.h>
13 #include <arpa/inet.h>
14 #include <sys/time.h>
15 #include <netdb.h>
16 #include <errno.h>
17 #include "th_string.h"
18
19 #define SET_BUFSIZE (4096)
20 #define SET_ALLOC_SIZE (128)
21
22 int openConnection(struct in_addr *addr, const int port);
23 void closeConnection(const int sock);
24 BOOL sendToSocket(const int sock, char *buf, const size_t bufLen);
25 BOOL sendUserMsg(const int sock, const char *user, const char *fmt, ...);
26
27
28 char *encodeStr1(const char *str);
29 char *decodeStr1(const char *str);
30 char *encodeStr2(const char *str);
31 char *decodeStr2(const char *str);
32 char *stripXMLTags(const char *str);
33
34
35 #endif