[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Windows and bufferevent_socket_connect



On Fri, Jan 23, 2015 at 04:59:57PM +0100, Andre wrote:
> >Have you checked the errno value?
> 
> Here is the errno value directly after the call of
> bufferevent_socket_connect:
> 
> errno is 2
> strerror(errno) is "No such file or directory"
> 
> I have no idea what this means. What went wrong?


Looks like a bad sockaddr issue. Either way, set it up in debug mode,
use whatever debugger you like, break on bufferevent_socket_connect, and
step through until you find what actually creates the error, it will
either be bufferevent_async_can_connect, bufferevent_async_connect,
or evutil_socket_connect.


To answer your original question "why would it be different", there is
extra work that needs to be done with windows async connections which
are a bit of a pain. 

But I would double check to make sure you correctly constructing your
sockaddr and the underlying family information.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.