Move to uSockets 0.3.5+ APIs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
+1
-1
Submodule uSockets updated: 929242ce52...8ef042a517
Reference in New Issue
Block a user