Rats, I've just realised this isn't going to work on Windows: "An operation was attempted on something that is not a socket"