From 6512b5f2c0c1e2340af31cdc479cf32aec8b9e78 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Fri, 8 May 2020 08:16:07 +0200 Subject: [PATCH] Move to uSockets 0.3.5+ APIs --- benchmarks/broadcast_test.c | 4 ++-- benchmarks/load_test.c | 4 ++-- benchmarks/scale_test.c | 4 ++-- uSockets | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/benchmarks/broadcast_test.c b/benchmarks/broadcast_test.c index a269529..0912590 100644 --- a/benchmarks/broadcast_test.c +++ b/benchmarks/broadcast_test.c @@ -68,7 +68,7 @@ void next_connection(struct us_socket_t *s) { /* We could wait with this until properly upgraded */ if (--connections) { - us_socket_context_connect(SSL, us_socket_context(SSL, s), host, port, 0, sizeof(struct http_socket)); + us_socket_context_connect(SSL, us_socket_context(SSL, s), host, port, NULL, 0, sizeof(struct http_socket)); } else { printf("Running benchmark now...\n"); start_iteration(); @@ -190,7 +190,7 @@ int main(int argc, char **argv) { us_socket_context_on_end(SSL, http_context, on_http_socket_end); /* Start making HTTP connections */ - us_socket_context_connect(SSL, http_context, host, port, 0, sizeof(struct http_socket)); + us_socket_context_connect(SSL, http_context, host, port, NULL, 0, sizeof(struct http_socket)); us_loop_run(loop); } diff --git a/benchmarks/load_test.c b/benchmarks/load_test.c index 8770a03..98bc4d2 100644 --- a/benchmarks/load_test.c +++ b/benchmarks/load_test.c @@ -48,7 +48,7 @@ void on_post(struct us_loop_t *loop) { void next_connection(struct us_socket_t *s) { /* We could wait with this until properly upgraded */ if (--connections) { - us_socket_context_connect(SSL, us_socket_context(SSL, s), host, port, 0, sizeof(struct http_socket)); + us_socket_context_connect(SSL, us_socket_context(SSL, s), host, port, NULL, 0, sizeof(struct http_socket)); } else { printf("Running benchmark now...\n"); @@ -155,7 +155,7 @@ int main(int argc, char **argv) { us_socket_context_on_end(SSL, http_context, on_http_socket_end); /* Start making HTTP connections */ - us_socket_context_connect(SSL, http_context, host, port, 0, sizeof(struct http_socket)); + us_socket_context_connect(SSL, http_context, host, port, NULL, 0, sizeof(struct http_socket)); us_loop_run(loop); } diff --git a/benchmarks/scale_test.c b/benchmarks/scale_test.c index 43b2928..63f0196 100644 --- a/benchmarks/scale_test.c +++ b/benchmarks/scale_test.c @@ -63,7 +63,7 @@ void next_connection(struct us_socket_t *s) { char buf[16]; sprintf(buf, "127.0.0.%d", address); - us_socket_context_connect(SSL, us_socket_context(SSL, s), buf, port, 0, sizeof(struct http_socket)); + us_socket_context_connect(SSL, us_socket_context(SSL, s), buf, port, NULL, 0, sizeof(struct http_socket)); } } @@ -178,7 +178,7 @@ int main(int argc, char **argv) { /* Start making HTTP connections */ for (int i = 0; i < BATCH_CONNECT; i++) { - us_socket_context_connect(SSL, http_context, host, port, 0, sizeof(struct http_socket)); + us_socket_context_connect(SSL, http_context, host, port, NULL, 0, sizeof(struct http_socket)); } us_loop_run(loop); diff --git a/uSockets b/uSockets index 929242c..8ef042a 160000 --- a/uSockets +++ b/uSockets @@ -1 +1 @@ -Subproject commit 929242ce5223115093e83683524cb4d7384c7868 +Subproject commit 8ef042a517872276cdfd5e209bde4febb7f4431d