mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-11 02:28:18 +00:00
17 lines
491 B
C
17 lines
491 B
C
|
#ifndef WEBSOCKETS_H
|
||
|
#define WEBSOCKETS_H
|
||
|
|
||
|
#if !defined(CONF_FAMILY_UNIX)
|
||
|
#error websockets only work on unix, sorry
|
||
|
#endif
|
||
|
|
||
|
#include <netinet/in.h>
|
||
|
|
||
|
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);
|
||
|
int websocket_send(int socket, const unsigned char *data, size_t size, int port);
|
||
|
int websocket_fd_set(int socket, fd_set *set);
|
||
|
|
||
|
#endif
|