connect fails on windows with "Either the application has not called WSAStartup, or WSAStartup failed."
According to "https://docs.rs/rustix/0.38.30/x86_64-pc-windows-msvc/rustix/net/fn.wsa_startup.html"
pub fn wsa_startup() -> Result
"On Windows, it’s necessary to initialize the sockets subsystem before using sockets APIs. The function performs the necessary initialization."
Calling this function before trying to connect solves the problem.