"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
>> ISTM there was some reason it wouldn't work, like maybe you can
>> only call WSAStartup once per program, but I don't recall for sure.
> We can call WSAStartup() more than once. However,there must be a
> call to WSACleanup() for every successful call to WSAStartup()
> made by a task. Only the final WSACleanup() for that task does the
> actual cleanup.
>
> The simplest way may be to call WSAStartup() while connecting and
> to call WSACleanup() while finishing(including error cases).
That would be an easy change. Are these functions fast enough that
calling them for every connect/disconnect cycle would be tolerable?
regards, tom lane