diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-04 16:30:20 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-04 16:30:20 +0000 |
commit | 82724c82fd69720a579a8b245637ac247c08c700 (patch) | |
tree | 1f805e13b5ebde8c3497c83914a317dd203bf263 /src/include | |
parent | 8ddcb8ca23638109b0b4c31b2214cd0cad700b6a (diff) | |
download | skalibs-82724c82fd69720a579a8b245637ac247c08c700.tar.xz |
Better interface for simple skaclient servers
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/skalibs/skaclient.h | 6 | ||||
-rw-r--r-- | src/include/skalibs/unixmessage.h | 16 |
2 files changed, 20 insertions, 2 deletions
diff --git a/src/include/skalibs/skaclient.h b/src/include/skalibs/skaclient.h index a057d50..3c7f6db 100644 --- a/src/include/skalibs/skaclient.h +++ b/src/include/skalibs/skaclient.h @@ -15,8 +15,10 @@ extern int skaclient_server_ack (unixmessage_t const *, unixmessage_sender_t *, unixmessage_sender_t *, char const *, unsigned int, char const *, unsigned int) ; extern int skaclient_server_bidi_ack (unixmessage_t const *, unixmessage_sender_t *, unixmessage_sender_t *, unixmessage_receiver_t *, char *, unsigned int, char *, unsigned int, char const *, unsigned int, char const *, unsigned int) ; -extern int skaclient_server_init (unixmessage_receiver_t *, char *, unsigned int, char *, unsigned int, unixmessage_sender_t *, unixmessage_sender_t *, char const *, unsigned int, char const *, unsigned int, tain_t const *, tain_t *) ; -#define skaclient_server_init_g(in, mainbuf, mainlen, auxbuf, auxlen, out, asyncout, before, beforelen, after, afterlen, deadline) skaclient_server_init(in, mainbuf, mainlen, auxbuf, auxlen, out, asyncout, before, beforelen, after, afterlen, (deadline), &STAMP) +extern int skaclient_server_init (unixmessage_receiver_t *, unixmessage_sender_t *, unixmessage_sender_t *, char const *, unsigned int, char const *, unsigned int, tain_t const *, tain_t *) ; +#define skaclient_server_init_g(in, out, asyncout, before, beforelen, after, afterlen, deadline) skaclient_server_init(in, out, asyncout, before, beforelen, after, afterlen, (deadline), &STAMP) +extern int skaclient_server_01x_init (char const *, unsigned int, char const *, unsigned int, tain_t const *, tain_t *) ; +#define skaclient_server_01x_init_g(before, beforelen, after, afterlen, deadline) skaclient_server_01x_init(before, beforelen, after, afterlen, (deadline), &STAMP) /* Client part: the rest of this file */ diff --git a/src/include/skalibs/unixmessage.h b/src/include/skalibs/unixmessage.h index 69d6717..accc258 100644 --- a/src/include/skalibs/unixmessage.h +++ b/src/include/skalibs/unixmessage.h @@ -100,4 +100,20 @@ extern int unixmessage_handle (unixmessage_receiver_t *, unixmessage_handler_fun extern int unixmessage_timed_handle (unixmessage_receiver_t *, unixmessage_handler_func_t *, void *, tain_t const *, tain_t *) ; #define unixmessage_timed_handle_g(b, f, p, deadline) unixmessage_timed_handle(b, f, p, (deadline), &STAMP) + + /* Globals */ + +#define UNIXMESSAGE_RECEIVER_MAINBUFSIZE 4097 +#define UNIXMESSAGE_RECEIVER_AUXBUFSIZE 4097 + +extern unixmessage_receiver_t unixmessage_receiver_0_ ; +#define unixmessage_receiver_0 (&unixmessage_receiver_0_) +extern int unixmessage_receiver_0_init (void) ; + +extern unixmessage_sender_t unixmessage_sender_1_ ; +#define unixmessage_sender_1 (&unixmessage_sender_1_) + +extern unixmessage_sender_t unixmessage_sender_x_ ; +#define unixmessage_sender_x (&unixmessage_sender_x_) + #endif |