diff options
Diffstat (limited to 'client/libacron/include/net.h')
-rw-r--r-- | client/libacron/include/net.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/client/libacron/include/net.h b/client/libacron/include/net.h new file mode 100644 index 0000000..5b10470 --- /dev/null +++ b/client/libacron/include/net.h @@ -0,0 +1,29 @@ +/* + * Created by yuuta on 7/13/22. + */ + +#ifndef LIBAC_NET_H +#define LIBAC_NET_H + +#include "common.h" +#include "events.h" +#include "requests.h" + +/* Connection */ + +typedef struct ac_connection_parameters { + /** + * ws://host:port/ws?id=id&token=token + * Currently wss is not supported. + * Port must be supplied, or libac will connect to port zero. + */ + char *url; +} ac_connection_parameters_t; + +int ac_connect(ac_connection_parameters_t parameters, void **out); + +int ac_disconnect(void *connection); + +int ac_receive(void *connection, ac_obj_t **response); + +#endif /* LIBAC_NET_H */ |