mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
add windows websockets client support
This commit is contained in:
parent
981d5d4e99
commit
d627b85202
|
@ -7,7 +7,11 @@
|
|||
#include "base/system.h"
|
||||
#include "protocol.h"
|
||||
#include "ringbuffer.h"
|
||||
#if defined(CONF_FAMILY_UNIX)
|
||||
#include <arpa/inet.h>
|
||||
#elif defined(CONF_FAMILY_WINDOWS)
|
||||
#include <Ws2tcpip.h>
|
||||
#endif
|
||||
#include <libwebsockets.h>
|
||||
|
||||
extern "C" {
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#ifndef ENGINE_SHARED_WEBSOCKETS_H
|
||||
#define ENGINE_SHARED_WEBSOCKETS_H
|
||||
|
||||
#if !defined(CONF_FAMILY_UNIX)
|
||||
#error websockets only work on unix, sorry
|
||||
#if defined(CONF_FAMILY_UNIX)
|
||||
#elif defined(CONF_FAMILY_WINDOWS)
|
||||
#include <winsock2.h>
|
||||
#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);
|
||||
|
|
Loading…
Reference in a new issue