Bug fixes

This commit is contained in:
2025-11-21 21:10:54 +01:00
parent 51d3f84715
commit 54c02827be
11 changed files with 111 additions and 86 deletions
+6 -18
View File
@@ -61,21 +61,8 @@
typedef uint32_t SocketHandle;
#define SOCKET_HANDLE_INVALID ((SocketHandle) 0)
typedef struct {
char *ptr;
int len;
} String;
typedef uint16_t Port;
typedef struct {
uint32_t data;
} IPv4;
typedef struct {
uint16_t data[8];
} IPv6;
typedef enum {
SOCKET_EVENT_READY,
SOCKET_EVENT_DISCONNECT,
@@ -136,8 +123,8 @@ typedef struct {
// Internal use only
typedef struct {
union {
IPv4 ipv4;
IPv6 ipv6;
HTTP_IPv4 ipv4;
HTTP_IPv6 ipv6;
};
bool is_ipv4;
Port port;
@@ -183,6 +170,7 @@ typedef struct {
};
#ifdef HTTPS_ENABLED
ClientSecureContext *client_secure_context;
ServerSecureContext *server_secure_context;
SSL *ssl;
#endif
@@ -313,9 +301,9 @@ typedef struct {
ConnectTargetType type;
Port port;
union {
IPv4 ipv4;
IPv6 ipv6;
String name;
HTTP_IPv4 ipv4;
HTTP_IPv6 ipv6;
HTTP_String name;
};
} ConnectTarget;