cURL / Mailing Lists / curl-library / Single Mail


Re: updated test

From: Andrew Francis <>
Date: Thu, 27 Sep 2001 12:04:11 +0800

[*cringe* I sent straight to Daniel, then did it again, hopefully
 I do this right and it goes to the list... 3rd time lucky? ;]


I've just tested it fine on

    FreeBSD 4.4-RELEASE
    Cygwin-1.1 environment under Win2k

Both used the O_NONBLOCK method.

I couldn't figure out how to get it compiling as a console app using
Visual C++ 6.. I got it to compile by altering the top of the file to:

    #include <winsock2.h>
    #include <windows.h>
    #include <time.h>
    #include <sys/types.h>
    #include <fcntl.h>
    #include <stdio.h>
    #include <errno.h>


however it didn't produce any output:

    H:\dl\tmp\nonblockconnect>cl /D "_MBCS" /D "WIN32" /D "VC6" /MD
    /linkws2_32.lib /subsystem:console
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804
for 80x86
    Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

    connect.c(107) : warning C4761: integral size mismatch in argument;
conversion supplied
    Microsoft (R) Incremental Linker Version 6.00.8447
    Copyright (C) Microsoft Corp 1992-1998. All rights reserved.




So I suspect I've done something rather wrong :)

(I fixed the size mismatch warning by changing the htons to htonl...
seems that Winsock expects the port number to be an integer/long as
opposed to a short?)

Andrew Francis
Received on 2001-09-27