diff options
| author | Easyoakland <[email protected]> | 2025-01-26 16:36:12 -0700 |
|---|---|---|
| committer | Easyoakland <[email protected]> | 2025-01-26 16:36:12 -0700 |
| commit | cbbc1f1a2ffc5e943e5ed9bb0d6cfa723111f7d1 (patch) | |
| tree | 994085c0a6fe9597f3116162590f5c0c49916c74 | |
| parent | c0d14a145c901126a548a77026ef2ef0d6e79738 (diff) | |
update comments to match code
| -rw-r--r-- | embassy-net/src/udp.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-net/src/udp.rs b/embassy-net/src/udp.rs index eca3980b9..7db9c5bbc 100644 --- a/embassy-net/src/udp.rs +++ b/embassy-net/src/udp.rs | |||
| @@ -226,7 +226,7 @@ impl<'a> UdpSocket<'a> { | |||
| 226 | /// | 226 | /// |
| 227 | /// This method will wait until the datagram has been sent. | 227 | /// This method will wait until the datagram has been sent. |
| 228 | /// | 228 | /// |
| 229 | /// If the socket's send buffer is too small to fit `buf`, this method will return `Poll::Ready(Err(SendError::Truncated))` | 229 | /// If the socket's send buffer is too small to fit `buf`, this method will return `Poll::Ready(Err(SendError::PacketTooLarge))` |
| 230 | /// | 230 | /// |
| 231 | /// When the remote endpoint is not reachable, this method will return `Err(SendError::NoRoute)` | 231 | /// When the remote endpoint is not reachable, this method will return `Err(SendError::NoRoute)` |
| 232 | pub async fn send_to<T>(&self, buf: &[u8], remote_endpoint: T) -> Result<(), SendError> | 232 | pub async fn send_to<T>(&self, buf: &[u8], remote_endpoint: T) -> Result<(), SendError> |
| @@ -244,7 +244,7 @@ impl<'a> UdpSocket<'a> { | |||
| 244 | /// When the socket's send buffer is full, this method will return `Poll::Pending` | 244 | /// When the socket's send buffer is full, this method will return `Poll::Pending` |
| 245 | /// and register the current task to be notified when the buffer has space available. | 245 | /// and register the current task to be notified when the buffer has space available. |
| 246 | /// | 246 | /// |
| 247 | /// If the socket's send buffer is too small to fit `buf`, this method will return `Poll::Ready(Err(SendError::Truncated))` | 247 | /// If the socket's send buffer is too small to fit `buf`, this method will return `Poll::Ready(Err(SendError::PacketTooLarge))` |
| 248 | /// | 248 | /// |
| 249 | /// When the remote endpoint is not reachable, this method will return `Poll::Ready(Err(Error::NoRoute))`. | 249 | /// When the remote endpoint is not reachable, this method will return `Poll::Ready(Err(Error::NoRoute))`. |
| 250 | pub fn poll_send_to<T>(&self, buf: &[u8], remote_endpoint: T, cx: &mut Context<'_>) -> Poll<Result<(), SendError>> | 250 | pub fn poll_send_to<T>(&self, buf: &[u8], remote_endpoint: T, cx: &mut Context<'_>) -> Poll<Result<(), SendError>> |
| @@ -280,7 +280,7 @@ impl<'a> UdpSocket<'a> { | |||
| 280 | /// This method will wait until the buffer can fit the requested size before | 280 | /// This method will wait until the buffer can fit the requested size before |
| 281 | /// calling the function to fill its contents. | 281 | /// calling the function to fill its contents. |
| 282 | /// | 282 | /// |
| 283 | /// If the socket's send buffer is too small to fit `size`, this method will return `Poll::Ready(Err(SendError::Truncated))` | 283 | /// If the socket's send buffer is too small to fit `size`, this method will return `Poll::Ready(Err(SendError::PacketTooLarge))` |
| 284 | /// | 284 | /// |
| 285 | /// When the remote endpoint is not reachable, this method will return `Err(SendError::NoRoute)` | 285 | /// When the remote endpoint is not reachable, this method will return `Err(SendError::NoRoute)` |
| 286 | pub async fn send_to_with<T, F, R>(&mut self, size: usize, remote_endpoint: T, f: F) -> Result<R, SendError> | 286 | pub async fn send_to_with<T, F, R>(&mut self, size: usize, remote_endpoint: T, f: F) -> Result<R, SendError> |
