tcp: add support for windows