It's not possible to bind the STM32 DatagramSocket (sdk/pkg/stm32/lib/socket.dart) to INADDR_ANY ("0.0.0.0") because _lookupHost() also returns 0 for invalid addresses, which causes an exception in line 199.
The POSIX DatagramSocket (sdk/pkg/socket/lib/socket.dart) doesn't have this issue, since sys.lookup() parses "0.0.0.0" to a valid InternetAddress and an error would only be thrown if the lookup returns null.
It's not possible to bind the STM32
DatagramSocket
(sdk/pkg/stm32/lib/socket.dart) toINADDR_ANY
("0.0.0.0") because_lookupHost()
also returns 0 for invalid addresses, which causes an exception in line 199.The POSIX
DatagramSocket
(sdk/pkg/socket/lib/socket.dart) doesn't have this issue, sincesys.lookup()
parses "0.0.0.0" to a validInternetAddress
and an error would only be thrown if the lookup returnsnull
.