Easyoakland
89e25c7b14
don't mention Poll::Ready for async fns as it's implied
2025-01-26 16:55:52 -07:00
Easyoakland
cbbc1f1a2f
update comments to match code
2025-01-26 16:36:12 -07:00
Easyoakland
c0d14a145c
- use with
...
- rename to Truncated to `PacketTooLarge`
2025-01-26 15:51:31 -07:00
Easyoakland
2fe299cc53
don't infinite loop if udp::send methods receive a buffer too large to ever be sent
2025-01-24 18:45:43 -07:00
Dániel Buga
44217aa092
Desugar some async fns
2024-12-30 12:13:13 +01:00
Dario Nieuwenhuis
e8ba9696f1
Merge pull request #3368 from AnthonyGrondin/main
...
feat(embassy-net): Implement `wait_recv_ready()` + `wait_send_ready()` for UdpSocket and `wait_read_ready()` + `wait_write_ready()` for TcpSocket
2024-10-21 00:35:13 +00:00
Fan Jiang
b4ee17fb4f
net: Add flush for UDP and Raw sockets.
2024-10-21 01:59:31 +02:00
Anthony Grondin
ae5b78b27a
feat(embassy-net): Implement wait_recv_ready() + wait_send_ready() for UdpSocket
...
- Provides `pub async fn wait_recv_ready(&self) -> ()` and `pub fn poll_recv_ready(&self, cx: &mut Context<'_>) -> Poll<()>`.
This allows polling / waiting on a socket until it can be read, without dequeuing any packets.
- Provides `pub async fn wait_send_ready(&self) -> ()` and `pub fn poll_send_ready(&self, cx: &mut Context<'_> -> Poll<()>`
This allows polling / waiting on a socket until it becomes writable.
2024-09-24 22:01:49 -04:00
Dario Nieuwenhuis
be0d9775e3
net: refactor to simplify lifetimes/generics.
2024-09-16 21:17:11 +02:00
Cirrus
9b142bd80f
feat(embassy-net): add zero-copy UDP send/recv functions
...
Added recv_from_with and send_to_with. These are conceptually similar
to TCP's read_with and write_with functions.
An application can parse received datagrams directly out of the
receive buffer or assemble a datagram of known-length directly into
the send buffer.
2024-08-25 13:14:36 -07:00
chrysn
49435f79b3
fixup! net/udp: Relay full UdpMetadata instead of only remote endpoint in poll_ functions
2024-04-19 15:54:56 +02:00
chrysn
2c7c39d1db
fixup! net/udp: Relay full UdpMetadata instead of only remote endpoint in poll_ functions
2024-04-19 15:51:27 +02:00
chrysn
8fe88847d8
fixup! net/udp: Relay full UdpMetadata instead of only remote endpoint in poll_ functions
2024-04-15 10:02:35 +02:00
chrysn
7f1bedcee0
net/udp: Relay full UdpMetadata instead of only remote endpoint in poll_ functions
...
This is a breaking change for users of the poll_ functions. (Some might
not notice if they already pass in an IpEndpoint into poll_send_to, or
discard that item in poll_recv_from).
2024-04-08 11:59:21 +02:00
Loïc Damien
d32fe0ccdc
Add set_hop_limit to UDP sockets
2023-12-28 22:15:16 +01:00
Dario Nieuwenhuis
f625f6b893
Upgrade to smoltcp v0.11.
2023-12-23 21:05:26 +01:00
JuliDi
d6a1b567ee
add SocketNotBound error message
2023-09-10 20:13:56 +02:00
Scott Mabin
c114ea024a
Add udp capacity impls
2023-08-15 15:31:23 +01:00
Roy Buitenhuis
f192f44018
fmt
2023-07-12 11:32:02 +02:00
Roy Buitenhuis
b81c14f442
Add polling fn's for send_to and recv_from in UdpSocket.
2023-07-12 11:32:02 +02:00
Roy Buitenhuis
f54e1cea90
Add poll functions on UdpSocket.
2023-07-12 11:32:02 +02:00
Dario Nieuwenhuis
64cba950e5
Update smoltcp.
2023-06-26 11:43:28 +02:00
Dario Nieuwenhuis
d07821d851
net: document crate.
2023-05-15 00:56:09 +02:00
Dario Nieuwenhuis
62857bdb2d
net: reexport UDP PacketMetadata under the udp module.
2023-05-15 00:55:34 +02:00
Roy Buitenhuis
46b437dea0
Wait for waker when no data is available on UDP socket.
2023-03-15 13:56:40 +01:00
Dario Nieuwenhuis
1f033d509a
net: split driver trait to a separate crate.
2022-12-26 04:49:08 +01:00
Dario Nieuwenhuis
aaaf5f23a8
net: move stack into lib.rs
2022-12-13 16:18:39 +01:00
Dario Nieuwenhuis
02abe00439
net: don't use UnsafeCell.
...
The "must not be called reentrantly" invariant is too "global" to
maintain comfortably, and the cost of the RefCell is negligible,
so this was a case of premature optimization.
2022-12-03 00:56:16 +01:00
Dario Nieuwenhuis
a0487380da
Replace futures::future::poll_fn -> core::future::poll_fn.
2022-09-22 16:42:49 +02:00
Artur Kowalski
ef473827a2
Remove UdpIo struct
...
UdpIo was shared by split sender/receives halves. Since split() API is
no more UdpIo is not needed and its APIs may be moved into UdpSocket.
2022-08-11 15:52:32 +02:00
Artur Kowalski
b97983242d
Simplify UDP code
...
Drop unneeded APIs: remove impls of embedded_io error traits, remove
flush() and split() methods.
2022-08-11 08:23:18 +02:00
Artur Kowalski
d5ab0d3ebb
Add UDP socket support
2022-08-10 19:40:35 +02:00