mirror of
https://github.com/smoltcp-rs/smoltcp.git
synced 2025-09-29 22:02:05 +00:00

Instead of eagerly sending the join/leave packet when the user calls join/leave, we update internal state and send the packet when the interface is polled. Advantages: - If the device is exhausted, the packet gets sent later instead of just failing and returning an error to the user. - Makes the API consistent with everything else in smoltcp: operations only update internal state, poll is what sends/receives packets. - Enables wrappers to offer simpler APIs with less generics. See https://github.com/embassy-rs/embassy/pull/3329 for an example, which is my original motivation.