X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-ws.h;h=4b26f0b91611f446a33821a1a0f6cf440a0e618d;hb=2195a00dc5b70636ccf57563cf907cb3a4b62afc;hp=cf01b0510ba58deaf52ff5593f61b28abd7c732f;hpb=1ea6bd0f466a10d29f12801aa35fb6d2b30443a1;p=src%2Fapp-framework-binder.git diff --git a/src/afb-ws.h b/src/afb-ws.h index cf01b051..4b26f0b9 100644 --- a/src/afb-ws.h +++ b/src/afb-ws.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016 "IoT.bzh" + * Copyright (C) 2016, 2017 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,6 +19,7 @@ struct afb_ws; struct sd_event; +struct iovec; struct afb_ws_itf { @@ -32,9 +33,12 @@ struct afb_ws_itf extern struct afb_ws *afb_ws_create(struct sd_event *eloop, int fd, const struct afb_ws_itf *itf, void *closure); extern void afb_ws_destroy(struct afb_ws *ws); extern void afb_ws_hangup(struct afb_ws *ws); +extern int afb_ws_is_connected(struct afb_ws *ws); extern int afb_ws_close(struct afb_ws *ws, uint16_t code, const char *reason); extern int afb_ws_error(struct afb_ws *ws, uint16_t code, const char *reason); extern int afb_ws_text(struct afb_ws *ws, const char *text, size_t length); extern int afb_ws_texts(struct afb_ws *ws, ...); extern int afb_ws_binary(struct afb_ws *ws, const void *data, size_t length); +extern int afb_ws_text_v(struct afb_ws *ws, const struct iovec *iovec, int count); +extern int afb_ws_binary_v(struct afb_ws *ws, const struct iovec *iovec, int count);