diff options
author | Trumeet <yuuta@yuuta.moe> | 2022-07-22 20:00:17 -0700 |
---|---|---|
committer | Trumeet <yuuta@yuuta.moe> | 2022-07-22 20:00:17 -0700 |
commit | 5995bcf5f672bc96f49ce7bde53ee864b5fe1e14 (patch) | |
tree | 210ab887b58ec2bc68730931da1848d292a25b48 /client/libacron/include/net.h | |
parent | 78d23828d7024a827135eb824e77e7bbf63bc065 (diff) | |
download | acron-5995bcf5f672bc96f49ce7bde53ee864b5fe1e14.tar acron-5995bcf5f672bc96f49ce7bde53ee864b5fe1e14.tar.gz acron-5995bcf5f672bc96f49ce7bde53ee864b5fe1e14.tar.bz2 acron-5995bcf5f672bc96f49ce7bde53ee864b5fe1e14.zip |
feat(libacron): ac_receive(): support setting a timeout
API:ADD
Signed-off-by: Trumeet <yuuta@yuuta.moe>
Diffstat (limited to 'client/libacron/include/net.h')
-rw-r--r-- | client/libacron/include/net.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/libacron/include/net.h b/client/libacron/include/net.h index 398450d..5cf8f67 100644 --- a/client/libacron/include/net.h +++ b/client/libacron/include/net.h @@ -41,8 +41,9 @@ LIBAC_EXPORT int ac_disconnect(void *connection); * Blocks the current thread until a new response or event arrives. * @param connection A non-NULL and connected connection passed as-is from ac_connect. * @param response Output response of either an event or a response. May be NULL even if it succeeds. + * @param timeout Read timeout in seconds. Set to 0 to wait infinitely. * @return AC_E_OK or an error code. When failed, *response is NULL. */ -LIBAC_EXPORT int ac_receive(void *connection, ac_obj_t **response); +LIBAC_EXPORT int ac_receive(void *connection, ac_obj_t **response, long timeout); #endif /* LIBAC_NET_H */ |