Thanks for the reply and apologies for not replying to you before. > That sounds like you need to rewrite the example more than just a little to > get that doing. Or is IOCP working very similar to asio? I pretty much changed everything from the example. > curl first calls connect() and waits for a successful connect to complete > before it tries to send, if you're using a TCP-based client. Can you help me find where the check to be sure that the connect has been completed is?
Thanks, Luigi -----Original Message----- From: curl-library [mailto:[email protected]] On Behalf Of Daniel Stenberg Sent: 24 October 2017 16:40 To: libcurl development <[email protected]> Subject: Re: WSASend returns WSAENOTCONN using multi-socket interface On Thu, 19 Oct 2017, Luigi Pomili wrote: > I'm new to libcurl and I'm trying to use the multi-socket interface by > following this example: https://curl.haxx.se/libcurl/c/asiohiper.html > What I'm doing different from the example is that I'm not using the > boost library but instead I'm using raw calls like WSASend and also using > IOCP. That sounds like you need to rewrite the example more than just a little to get that doing. Or is IOCP working very similar to asio? > My problem is that after the open socket, where I create the socket > and return the fd to libcurl for it to do the connect in > singleipconnect(in connect.c), libcurl immediately calls send on it > which returns WSAENOTCONN the first time and WSAENOTSOCK if I try again. curl first calls connect() and waits for a successful connect to complete before it tries to send, if you're using a TCP-based client. > So my question is: am I missing something? Should I add something that > checks if the connect is finished myself? No, curl does that by itself. If you use the curl command line tool against this server you try with, I presume it works for you? -- / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
