There are 4 calls to _close on io->fd in functions PIO_win32_send and
PIO_win32_recv.
However, the CRT function _close should not be applied on SOCKET, which
crashes here.
I suggest to replace "_close((SOCKET)io->fd);" by "PIO_win32_close(interp,
layer, io);"
or "closesocket((SOCKET)io->fd); io->fd = 0;".
Xi