Dear Gustaf,
  I've tried all combinations... here's the result:
  the original code was:
        DWORD n1;
        if (WSASend(sock, (LPWSABUF)bufs, nbufs, &n1, flags,
                    NULL, NULL) != 0) {
            n1 = -1;
        }
        n = n1;
and it DOES NOT WOK
I then used the readability improvement modification you posted this morning at 09:57:40
		DWORD bytesReceived;
		int   rc;
		rc = WSASend(sock, (LPWSABUF)bufs, nbufs, &bytesReceived, flags,
			NULL, NULL);
		if (rc == 0) {
			n = bytesReceived;
		} else {
			n = -1;
		}
and it DOES WORK
My original fix was to use a plain send
#		if _MSC_VER < 1900
        DWORD n1;
        if (WSASend(sock, (LPWSABUF)bufs, nbufs, &n1, flags,
                    NULL, NULL) != 0) {
            n1 = -1;
        }
        n = n1;
#else
		n = send(sock, (LPWSABUF)bufs[0].iov_base, bufs[0].iov_len, flags);
#endif
and it DOES WORK
I will include your  modification in my distribution, though I cannot see any difference between the first two implementations, but the code is here if anyone wants to check.
Thank you very much,
Maurizio