summaryrefslogtreecommitdiffstats
path: root/src/aclk/mqtt_websockets/ws_client.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:33:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-11-25 17:34:10 +0000
commit83ba6762cc43d9db581b979bb5e3445669e46cc2 (patch)
tree2e69833b43f791ed253a7a20318b767ebe56cdb8 /src/aclk/mqtt_websockets/ws_client.h
parentReleasing debian version 1.47.5-1. (diff)
downloadnetdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.tar.xz
netdata-83ba6762cc43d9db581b979bb5e3445669e46cc2.zip
Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/aclk/mqtt_websockets/ws_client.h')
-rw-r--r--src/aclk/mqtt_websockets/ws_client.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/aclk/mqtt_websockets/ws_client.h b/src/aclk/mqtt_websockets/ws_client.h
index 0ccbd29a8..67e5835a2 100644
--- a/src/aclk/mqtt_websockets/ws_client.h
+++ b/src/aclk/mqtt_websockets/ws_client.h
@@ -1,14 +1,8 @@
-// SPDX-License-Identifier: GPL-3.0-only
-// Copyright (C) 2020 Timotej Šiškovič
+// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef WS_CLIENT_H
#define WS_CLIENT_H
-#include "c-rbuf/cringbuffer.h"
-#include "mqtt_wss_log.h"
-
-#include <stdint.h>
-
#define WS_CLIENT_NEED_MORE_BYTES 0x10
#define WS_CLIENT_PARSING_DONE 0x11
#define WS_CLIENT_CONNECTION_CLOSED 0x12
@@ -98,23 +92,20 @@ typedef struct websocket_client {
// memory usage and remove one more memcpy buf_read->buf_to_mqtt
rbuf_t buf_to_mqtt; // RAW data for MQTT lib
- int entropy_fd;
-
// careful host is borrowed, don't free
char **host;
- mqtt_wss_log_ctx_t log;
} ws_client;
-ws_client *ws_client_new(size_t buf_size, char **host, mqtt_wss_log_ctx_t log);
+ws_client *ws_client_new(size_t buf_size, char **host);
void ws_client_destroy(ws_client *client);
void ws_client_reset(ws_client *client);
int ws_client_start_handshake(ws_client *client);
-int ws_client_want_write(ws_client *client);
+int ws_client_want_write(const ws_client *client);
int ws_client_process(ws_client *client);
-int ws_client_send(ws_client *client, enum websocket_opcode frame_type, const char *data, size_t size);
+int ws_client_send(const ws_client *client, enum websocket_opcode frame_type, const char *data, size_t size);
#endif /* WS_CLIENT_H */