1#ifndef ENGINE_SHARED_WEBSOCKETS_H
2#define ENGINE_SHARED_WEBSOCKETS_H
3
4#if defined(CONF_FAMILY_UNIX)
5#elif defined(CONF_FAMILY_WINDOWS)
6#include <winsock2.h>
7#endif
8
9#include <cstddef>
10
11int websocket_create(const char *addr, int port);
12int websocket_destroy(int socket);
13int websocket_recv(int socket, unsigned char *data, size_t maxsize, struct sockaddr_in *sockaddrbuf, size_t fromLen);
14int websocket_send(int socket, const unsigned char *data, size_t size,
15 const char *addr_str, int port);
16int websocket_fd_set(int socket, fd_set *set);
17
18#endif // ENGINE_SHARED_WEBSOCKETS_H
19