diff options
author | Mattias Andrée <maandree@kth.se> | 2016-08-04 21:31:36 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-08-04 21:31:36 +0200 |
commit | fb769aeaff23e79e4167823ef2923a7d61807718 (patch) | |
tree | 2471635ef0c8f01d1e5ed01c33a704a7f8c926d0 /src/libcoopgamma.c | |
parent | Fix bugs (and a tiny improvement) (diff) | |
download | libcoopgamma-fb769aeaff23e79e4167823ef2923a7d61807718.tar.gz libcoopgamma-fb769aeaff23e79e4167823ef2923a7d61807718.tar.bz2 libcoopgamma-fb769aeaff23e79e4167823ef2923a7d61807718.tar.xz |
Add libcoopgamma_skip_message
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/libcoopgamma.c')
-rw-r--r-- | src/libcoopgamma.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libcoopgamma.c b/src/libcoopgamma.c index fbdef21..c4f13ab 100644 --- a/src/libcoopgamma.c +++ b/src/libcoopgamma.c @@ -1742,6 +1742,19 @@ static char* next_payload(libcoopgamma_context_t* restrict ctx, size_t* n) /** + * Tell the library that you will not be parsing a receive message + * + * @param ctx The state of the library, must be connected + */ +void libcoopgamma_skip_message(libcoopgamma_context_t* restrict ctx) +{ + size_t _n; + while (*next_header(ctx)); + (void) next_payload(ctx, &_n); +} + + +/** * Check whether the server sent an error, if so copy it to `ctx` * * This function will also reports EBADMSG if the message ID |