Skip to content

Commit 182b7e4

Browse files
committed
Update quic example
1 parent 0ba506f commit 182b7e4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

examples/http3_client.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void on_stream_headers(us_quic_stream_t *s) {
8484
//print_current_headers();
8585

8686
/* Make a new stream */
87-
us_quic_socket_create_stream(us_quic_stream_socket(s));
87+
us_quic_socket_create_stream(us_quic_stream_socket(s), 0);
8888
}
8989

9090
/* And this would be the body of the request */
@@ -109,7 +109,7 @@ void on_start(struct us_timer_t *t) {
109109

110110

111111
if (num_sockets < 10) {
112-
us_quic_socket_t *connect_socket = us_quic_socket_context_connect(context, "::1", 9004);
112+
us_quic_socket_t *connect_socket = us_quic_socket_context_connect(context, "::1", 9004, 0);
113113
} else {
114114
if (!ignore) {
115115

@@ -120,7 +120,7 @@ void on_start(struct us_timer_t *t) {
120120
printf("Starting now\n");
121121
for (int i = 0; i < num_sockets; i++) {
122122
for (int j = 0; j < 32; j++) {
123-
us_quic_socket_create_stream(sockets[i]);
123+
us_quic_socket_create_stream(sockets[i], 0);
124124
}
125125
}
126126
}
@@ -171,7 +171,7 @@ int main() {
171171
};
172172

173173
/* Create quic socket context (assumes h3 for now) */
174-
context = us_create_quic_socket_context(loop, options);
174+
context = us_create_quic_socket_context(loop, options, 0);
175175

176176
/* Specify application callbacks */
177177
us_quic_socket_context_on_stream_data(context, on_stream_data);

examples/http3_server.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main() {
8989
};
9090

9191
/* Create quic socket context (assumes h3 for now) */
92-
context = us_create_quic_socket_context(loop, options);
92+
context = us_create_quic_socket_context(loop, options, 0);
9393

9494
/* Specify application callbacks */
9595
us_quic_socket_context_on_stream_data(context, on_stream_data);
@@ -101,7 +101,7 @@ int main() {
101101
us_quic_socket_context_on_close(context, on_close);
102102

103103
/* The listening socket is the actual UDP socket used */
104-
us_quic_listen_socket_t *listen_socket = us_quic_socket_context_listen(context, "::1", 9004);
104+
us_quic_listen_socket_t *listen_socket = us_quic_socket_context_listen(context, "::1", 9004, 0);
105105

106106
/* Run the event loop */
107107
us_loop_run(loop);

0 commit comments

Comments
 (0)