diff options
author | fcolin | 2005-07-12 15:53:07 +0000 |
---|---|---|
committer | fcolin | 2005-07-12 15:53:07 +0000 |
commit | ab7132a03e9be01340c04d228731372ff40ddf16 (patch) | |
tree | c6c11f3ef136a2e1a0ac3b01e18acd7ec865562b /src/ivysocket.h | |
parent | ca6cbf19ecdc5c9d5c5fb6cef3ae411cffc71589 (diff) | |
download | ivy-c-ab7132a03e9be01340c04d228731372ff40ddf16.zip ivy-c-ab7132a03e9be01340c04d228731372ff40ddf16.tar.gz ivy-c-ab7132a03e9be01340c04d228731372ff40ddf16.tar.bz2 ivy-c-ab7132a03e9be01340c04d228731372ff40ddf16.tar.xz |
suppression du terminateur dans le code socket
en vu d'une transmission binaire
Diffstat (limited to 'src/ivysocket.h')
-rw-r--r-- | src/ivysocket.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/ivysocket.h b/src/ivysocket.h index b57a632..9bfb17f 100644 --- a/src/ivysocket.h +++ b/src/ivysocket.h @@ -53,13 +53,15 @@ extern int make_message_var(char ** buffer, int *size, int offset, const char * /* Forward def */ typedef struct _client *Client; -typedef void (*SocketInterpretation) (Client client, void *data, char *ligne); +typedef char* (*SocketInterpretation) (Client client, void *data, char *ligne, unsigned long len); +typedef void* (*SocketCreate) (Client client); +typedef void (*SocketDelete) (Client client, void *data); /* Server Part */ typedef struct _server *Server; extern Server SocketServer(unsigned short port, - void*(*create)(Client client), - void(*handle_delete)(Client client, void *data), + SocketCreate create, + SocketDelete handle_delete, SocketInterpretation interpretation); extern unsigned short SocketServerGetPort( Server server ); extern void SocketServerClose( Server server ); @@ -76,17 +78,13 @@ extern void SocketBroadcast( char *fmt, ... ); extern Client SocketConnect( char * host, unsigned short port, void *data, SocketInterpretation interpretation, - char terminator, - void (*handle_delete)(Client client, void *data) - ); + SocketDelete handle_delete + ); extern Client SocketConnectAddr( struct in_addr * addr, unsigned short port, void *data, SocketInterpretation interpretation, - char terminator, - void (*handle_delete)(Client client, void *data) + SocketDelete handle_delete ); -extern int SocketWaitForReply( Client client, char *buffer, int size, int delai); - /* Socket UDP */ /* Creation d'une socket en mode non connecte */ /* et ecoute des messages */ |