aboutsummaryrefslogtreecommitdiff
path: root/client/libacron/include/net.h
blob: 5b104701329b052c2d3620b828bca63cbcf2f27e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 */