2018-07-06 14:11:38 +00:00
|
|
|
#ifndef ENGINE_SHARED_WEBSOCKETS_H
|
|
|
|
#define ENGINE_SHARED_WEBSOCKETS_H
|
2015-02-07 22:15:58 +00:00
|
|
|
|
2020-09-15 12:54:33 +00:00
|
|
|
#if defined(CONF_FAMILY_UNIX)
|
|
|
|
#elif defined(CONF_FAMILY_WINDOWS)
|
|
|
|
#include <winsock2.h>
|
2015-02-07 22:15:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
int websocket_create(const char *addr, int port);
|
|
|
|
int websocket_destroy(int socket);
|
|
|
|
int websocket_recv(int socket, unsigned char *data, size_t maxsize, struct sockaddr_in *sockaddrbuf, size_t fromLen);
|
2020-09-12 15:12:00 +00:00
|
|
|
int websocket_send(int socket, const unsigned char *data, size_t size,
|
|
|
|
const char *addr_str, int port);
|
2015-02-07 22:15:58 +00:00
|
|
|
int websocket_fd_set(int socket, fd_set *set);
|
|
|
|
|
2018-07-06 14:11:38 +00:00
|
|
|
#endif // ENGINE_SHARED_WEBSOCKETS_H
|