diff options
author | bustico | 2008-05-19 15:31:30 +0000 |
---|---|---|
committer | bustico | 2008-05-19 15:31:30 +0000 |
commit | 09f82d4e1e6dd1672b272c314c42d5cf30c91ea8 (patch) | |
tree | a25557d3aad5edc2641f98ea434e0b676f6b6872 /src/ivysocket.h | |
parent | 7cd590600a7ff3dd8defc3d639fd3e87f1973015 (diff) | |
download | ivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.zip ivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.tar.gz ivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.tar.bz2 ivy-c-09f82d4e1e6dd1672b272c314c42d5cf30c91ea8.tar.xz |
* make the lib and api more robust by adding const where they should be
* compile with -Wall and eliminate remaining warnings
Diffstat (limited to 'src/ivysocket.h')
-rw-r--r-- | src/ivysocket.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ivysocket.h b/src/ivysocket.h index 551ec52..df43303 100644 --- a/src/ivysocket.h +++ b/src/ivysocket.h @@ -54,14 +54,14 @@ extern void SocketInit(); /* Forward def */ typedef struct _client *Client; -typedef void (*SocketInterpretation) (Client client, void *data, char *ligne); +typedef void (*SocketInterpretation) (Client client, const void *data, char *ligne); /* Server Part */ typedef struct _server *Server; extern Server SocketServer(unsigned short port, void*(*create)(Client client), - void(*handle_delete)(Client client, void *data), - void(*handle_decongestion)(Client client, void *data), + void(*handle_delete)(Client client, const void *data), + void(*handle_decongestion)(Client client, const void *data), SocketInterpretation interpretation); extern unsigned short SocketServerGetPort( Server server ); extern void SocketServerClose( Server server ); @@ -73,21 +73,21 @@ extern SendState SocketSend( Client client, char *fmt, ... ); extern SendState SocketSendRaw( const Client client, const char *buffer, const int len ); extern SendState SocketSendRawWithId( const Client client, const char *id, const char *buffer, const int len ); extern char *SocketGetPeerHost( Client client ); -extern void SocketSetData( Client client, void *data ); -extern void *SocketGetData( Client client ); +extern void SocketSetData( Client client, const void *data ); +extern const void *SocketGetData( Client client ); extern void SocketBroadcast( char *fmt, ... ); extern Client SocketConnect( char * host, unsigned short port, void *data, SocketInterpretation interpretation, - void (*handle_delete)(Client client, void *data), - void(*handle_decongestion)(Client client, void *data) + void (*handle_delete)(Client client, const void *data), + void(*handle_decongestion)(Client client, const void *data) ); extern Client SocketConnectAddr( struct in_addr * addr, unsigned short port, void *data, SocketInterpretation interpretation, - void (*handle_delete)(Client client, void *data), - void(*handle_decongestion)(Client client, void *data) + void (*handle_delete)(Client client, const void *data), + void(*handle_decongestion)(Client client, const void *data) ); extern int SocketWaitForReply( Client client, char *buffer, int size, int delai); |