view 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
line wrap: on
line source

/*
 * NNChat - Custom chat client for NewbieNudes.com chatrooms
 * Written by Matti 'ccr' Hämäläinen
 * (C) Copyright 2008 Tecnic Software productions (TNSP)
 */
#ifndef LIBNNCHAT_H
#define LIBNNCHAT_H

#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <sys/time.h>
#include <netdb.h>
#include <errno.h>
#include "th_string.h"

#define SET_BUFSIZE     (4096)
#define SET_ALLOC_SIZE	(128)

int     openConnection(struct in_addr *addr, const int port);
void    closeConnection(const int sock);
BOOL    sendToSocket(const int sock, char *buf, const size_t bufLen);
BOOL    sendUserMsg(const int sock, const char *user, const char *fmt, ...);


char    *encodeStr1(const char *str);
char    *decodeStr1(const char *str);
char    *encodeStr2(const char *str);
char    *decodeStr2(const char *str);
char    *stripXMLTags(const char *str);


#endif