Move to uSockets 0.3.5+ APIs

This commit is contained in:
Alex Hultman
2020-05-08 08:16:07 +02:00
parent cdda308bc2
commit 6512b5f2c0
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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);