Skip to content

Commit

Permalink
blind approach to support IPv6 on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mman committed Mar 8, 2024
1 parent e085b0a commit 29943a6
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <windows.h>
#include <mmsystem.h>
#include <ws2ipdef.h>
#include <ws2tcpip.h>

static enet_uint32 timeBase = 0;

Expand Down Expand Up @@ -364,10 +365,12 @@ enet_socket_destroy (ENetSocket socket)
}

int
enet_socket_send (ENetSocket socket,
enet_socket_send (void * context, ENetSocket socket,
const ENetAddress * address,
const ENetBuffer * buffers,
size_t bufferCount)
size_t bufferCount,
const ENetAddress * sourceAddress,
void * connection)
{
struct sockaddr_in6 sin;
DWORD sentLength = 0;
Expand Down Expand Up @@ -401,10 +404,12 @@ enet_socket_send (ENetSocket socket,
}

int
enet_socket_receive (ENetSocket socket,
enet_socket_receive (void * context, ENetSocket socket,
ENetAddress * address,
ENetBuffer * buffers,
size_t bufferCount)
size_t bufferCount,
const ENetAddress * destinationAddress,
void ** connection)
{
INT sinLength = sizeof (struct sockaddr_in6);
DWORD flags = 0,
Expand Down

0 comments on commit 29943a6

Please sign in to comment.