summaryrefslogtreecommitdiff
path: root/src/plugins/relay/relay-http.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-03-31 09:49:10 +0200
committerSébastien Helleu <flashcode@flashtux.org>2024-04-07 13:18:13 +0200
commit90b855e1aa23886dbb4bd794e2527a26973dd5fb (patch)
tree2ffc437362634955d801bb0ca8442e611bbcb321 /src/plugins/relay/relay-http.c
parentfd3219246432b35f165c5d1edfa78c76a743723e (diff)
downloadweechat-90b855e1aa23886dbb4bd794e2527a26973dd5fb.zip
relay: add connection to remote (issue #2066)
Connection to remote: - handshake: offer support for all supported hash algorithms - network connect with a socket - upgrade to websocket and authenticate with remote (password/TOTP) - check websocket response - get list of buffers (not used yet) Note: connection to remote with TLS or a proxy is not yet supported.
Diffstat (limited to 'src/plugins/relay/relay-http.c')
-rw-r--r--src/plugins/relay/relay-http.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/relay/relay-http.c b/src/plugins/relay/relay-http.c
index 8b64deb23..58879b4fa 100644
--- a/src/plugins/relay/relay-http.c
+++ b/src/plugins/relay/relay-http.c
@@ -833,7 +833,7 @@ relay_http_process_websocket (struct t_relay_client *client)
if (handshake)
{
relay_client_send (client,
- RELAY_CLIENT_MSG_STANDARD,
+ RELAY_MSG_STANDARD,
handshake,
strlen (handshake), NULL);
free (handshake);
@@ -877,10 +877,10 @@ relay_http_process_request (struct t_relay_client *client)
{
if (client->http_req->raw)
{
- relay_raw_print (client, RELAY_CLIENT_MSG_STANDARD,
- RELAY_RAW_FLAG_RECV,
- *(client->http_req->raw),
- strlen (*(client->http_req->raw)) + 1);
+ relay_raw_print_client (client, RELAY_MSG_STANDARD,
+ RELAY_RAW_FLAG_RECV,
+ *(client->http_req->raw),
+ strlen (*(client->http_req->raw)) + 1);
}
/* if websocket is initializing */
@@ -1199,7 +1199,7 @@ relay_http_send (struct t_relay_client *client,
if (!ptr_body || (*ptr_body_size <= 0))
{
- num_bytes = relay_client_send (client, RELAY_CLIENT_MSG_STANDARD,
+ num_bytes = relay_client_send (client, RELAY_MSG_STANDARD,
str_header, length_header, NULL);
}
else
@@ -1227,7 +1227,7 @@ relay_http_send (struct t_relay_client *client,
{
raw_message = NULL;
}
- num_bytes = relay_client_send (client, RELAY_CLIENT_MSG_STANDARD,
+ num_bytes = relay_client_send (client, RELAY_MSG_STANDARD,
http_message, length_msg,
raw_message);
if (raw_message)