summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Junho Choi <1229714+junhochoi@users.noreply.github.com> 2021-05-28 01:48:22 -0700
committerGravatar GitHub <noreply@github.com> 2021-05-28 09:48:22 +0100
commitfa78fea40866178179536a779e2c1b1ab2bbdad8 (patch)
tree197fa4d077a284290474e0aa2db9c66814203f2e
parent56edda7621623d2927bc1a368614540648615d46 (diff)
downloadquiche-fa78fea40866178179536a779e2c1b1ab2bbdad8.tar.gz
quiche-fa78fea40866178179536a779e2c1b1ab2bbdad8.tar.zst
quiche-fa78fea40866178179536a779e2c1b1ab2bbdad8.zip
apps/examples/http3_test: use connectionless UDP socket on clients
Now it uses sendto() and recvfrom(), the socket need to be connectionless. Fixes #952.
-rw-r--r--examples/client.c5
-rw-r--r--examples/client.rs1
-rw-r--r--examples/http3-client.c5
-rw-r--r--examples/http3-client.rs1
-rw-r--r--tools/apps/src/client.rs1
-rw-r--r--tools/http3_test/src/runner.rs1
6 files changed, 0 insertions, 14 deletions
diff --git a/examples/client.c b/examples/client.c
index 714e8d42..0df96658 100644
--- a/examples/client.c
+++ b/examples/client.c
@@ -246,11 +246,6 @@ int main(int argc, char *argv[]) {
return -1;
}
- if (connect(sock, peer->ai_addr, peer->ai_addrlen) < 0) {
- perror("failed to connect socket");
- return -1;
- }
-
quiche_config *config = quiche_config_new(0xbabababa);
if (config == NULL) {
fprintf(stderr, "failed to create config\n");
diff --git a/examples/client.rs b/examples/client.rs
index ebce074b..88490aaa 100644
--- a/examples/client.rs
+++ b/examples/client.rs
@@ -69,7 +69,6 @@ fn main() {
// Create the UDP socket backing the QUIC connection, and register it with
// the event loop.
let socket = std::net::UdpSocket::bind(bind_addr).unwrap();
- socket.connect(peer_addr).unwrap();
let socket = mio::net::UdpSocket::from_socket(socket).unwrap();
poll.register(
diff --git a/examples/http3-client.c b/examples/http3-client.c
index e2334835..6b263ffd 100644
--- a/examples/http3-client.c
+++ b/examples/http3-client.c
@@ -344,11 +344,6 @@ int main(int argc, char *argv[]) {
return -1;
}
- if (connect(sock, peer->ai_addr, peer->ai_addrlen) < 0) {
- perror("failed to connect socket");
- return -1;
- }
-
quiche_config *config = quiche_config_new(0xbabababa);
if (config == NULL) {
fprintf(stderr, "failed to create config\n");
diff --git a/examples/http3-client.rs b/examples/http3-client.rs
index 4fd612eb..07a5a1a1 100644
--- a/examples/http3-client.rs
+++ b/examples/http3-client.rs
@@ -67,7 +67,6 @@ fn main() {
// Create the UDP socket backing the QUIC connection, and register it with
// the event loop.
let socket = std::net::UdpSocket::bind(bind_addr).unwrap();
- socket.connect(peer_addr).unwrap();
let socket = mio::net::UdpSocket::from_socket(socket).unwrap();
poll.register(
diff --git a/tools/apps/src/client.rs b/tools/apps/src/client.rs
index 24c8121f..26b86b62 100644
--- a/tools/apps/src/client.rs
+++ b/tools/apps/src/client.rs
@@ -81,7 +81,6 @@ pub fn connect(
// Create the UDP socket backing the QUIC connection, and register it with
// the event loop.
let socket = std::net::UdpSocket::bind(bind_addr).unwrap();
- socket.connect(peer_addr).unwrap();
let socket = mio::net::UdpSocket::from_socket(socket).unwrap();
poll.register(
diff --git a/tools/http3_test/src/runner.rs b/tools/http3_test/src/runner.rs
index 43607033..fb3f27cb 100644
--- a/tools/http3_test/src/runner.rs
+++ b/tools/http3_test/src/runner.rs
@@ -73,7 +73,6 @@ pub fn run(
// Create the UDP socket backing the QUIC connection, and register it with
// the event loop.
let socket = std::net::UdpSocket::bind(bind_addr).unwrap();
- socket.connect(peer_addr).unwrap();
let socket = mio::net::UdpSocket::from_socket(socket).unwrap();
poll.register(