From 216e4008069a5a1fe2c4270c6bd6209da27ba4bf Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 20 May 2005 12:48:19 +0000 Subject: elimination des tailles de buffer par utilisation de realloc la plupart des fonctions utilisent un pointeur static pour eviter de multiple malloc/free ce qui veut dire que IvyC n'est pas reentrant !!!! --- src/ivysocket.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/ivysocket.h') diff --git a/src/ivysocket.h b/src/ivysocket.h index 4afde64..5dfdf0a 100644 --- a/src/ivysocket.h +++ b/src/ivysocket.h @@ -20,7 +20,9 @@ #ifdef __cplusplus extern "C" { #endif - + +#include + /* general Handle */ #define ANYPORT 0 @@ -46,6 +48,9 @@ extern "C" { /* General Init */ extern void SocketInit(); +/* utility fonction do make vsprintf without buffer limit */ +extern int make_message(char ** buffer, int *size, const char *fmt, va_list ap); + /* Forward def */ typedef struct _client *Client; typedef void (*SocketInterpretation) (Client client, void *data, char *ligne); @@ -63,6 +68,8 @@ extern void SocketServerClose( Server server ); extern void SocketClose( Client client ); extern void SocketSend( Client client, char *fmt, ... ); +extern void SocketSendBuffered (Client client, char *fmt, ... ); +extern void SocketFlush ( Client client ); extern void SocketSendRaw( Client client, char *buffer, int len ); extern char *SocketGetPeerHost( Client client ); extern void SocketSetData( Client client, void *data ); -- cgit v1.1