Summary:
LLVM has a warning `-Wunreachable-code-return` which identifies return statements that cannot be reached.
In innocuous situations such statements are often present:
* to satisfy a compiler warning that existed before `[[noreturn]]` was introduced. Now that we have `[[noreturn]]`, this use is not necessary.
* to specify a return type. But there are clearer ways to do this.
* in place of the more legible `__builtin_unreachable()` (which will soon become `std::unreachable()`). In this case, we should use the more legible alternative.
* because the programmer was afraid of the function unexpectedly returning. But we check for this condition with `-Wreturn-type`.
In dangerous situations such statements can obscure the intended execution of the program or even hide an erroneous early return.
In this diff, we remove one or more unreachable returns.
- If you approve of this diff, please use the "Accept & Ship" button :-)
Reviewed By: hanidamlaj
Differential Revision: D80557705
fbshipit-source-id: ab7adc3c1108f28e9e4d22e1c046c28d589b2330
Summary:
- Mark the socket as bound_ when connect() succeeds.
- FIx the length used for sockaddr for IPv6 when connecting or reading back the local address
Reviewed By: mjoras
Differential Revision: D79825831
fbshipit-source-id: c9d05af9b8c8bc479f760cc2e34566f450e2613e
Summary: use std::function in base transport
Reviewed By: mjoras
Differential Revision: D73380174
fbshipit-source-id: 2e51c8bd28c3b7387908cfb04008836f0e6daccf
Summary: More in the theme of returning Expected instead of throwing. For the folly case, we keep the try/catches in there and translate to Expected. For Libev, we convert directly to Expected.
Reviewed By: kvtsoy
Differential Revision: D73217128
fbshipit-source-id: d00a978f24e3b29a77a8ac99a19765ae49f64df8
Summary:
**Context**: adding more debugging to catch the 0RTT bug.
Wonder if the client is down to read more data. There could presumably be some bug with 0RTT + happy eyeballs where the socket isnt working.
Reviewed By: lnicco
Differential Revision: D72266611
fbshipit-source-id: 6420017efcb200dd04bb7070c6c31049bcee8148
Summary: I'm switching the usages of `writem` to use iovecs instead of IOBufs.
Reviewed By: kvtsoy
Differential Revision: D68857701
fbshipit-source-id: 96461aac85f39da9b85e16f2927b4539e712e5cb
Summary:
FOLLY_HAVE_RECVMMSG is no longer available: D59072339.
This changes LibevQuicAsyncUDPSocket to use recvmmsg and implement it using recvmsg in runtime if it's not available.
Reviewed By: kvtsoy
Differential Revision: D59527136
fbshipit-source-id: 18acc3af74a8782531b92b71aaa9bc0e0dfd8019
Summary:
The idea here is to make it so we can swap out the type we are using for optionality. In the near term we are going to try swapping towards one that more aggressively tries to save size.
For now there is no functional change and this is just a big aliasing diff.
Reviewed By: sharmafb
Differential Revision: D57633896
fbshipit-source-id: 6eae5953d47395b390016e59cf9d639f3b6c8cfe
Summary: As title. The functionality is mostly copied over from folly::AsyncUDPSocket.
Reviewed By: kvtsoy
Differential Revision: D54832808
fbshipit-source-id: c2ee71b28c64f26b826d544771593c9c1d3135ef
Summary: Previously, writing would fail due to the wrong address size being used. This fixes it.
Reviewed By: lhuang04
Differential Revision: D53627612
fbshipit-source-id: cecbecd210580287336d0e72f486b1044bffb035
Summary:
It's fine to just return that it didn't work.
(Note: this ignores all push blocking failures!)
Reviewed By: kvtsoy
Differential Revision: D53298640
fbshipit-source-id: 7a25351a716541c1f028c28c40be30fde821b5cd
Summary: Introduces LibevQuicAsyncUDPSocket; a pure libc socket wrapper that implements QuicAsyncUDPSocket that is driven by LibevQuicEventBase.
Reviewed By: mjoras
Differential Revision: D51285024
fbshipit-source-id: 92c5ef6e8d0ed051624a60a1854d0805df31894e