bufferevent_socket_connect

Launch a connect() attempt with a socket-based bufferevent.

When the connect succeeds, the eventcb will be invoked with BEV_EVENT_CONNECTED set.

If the bufferevent does not already have a socket set, we allocate a new socket here and make it nonblocking before we begin.

If no address is provided, we assume that the socket is already connecting, and configure the bufferevent so that a BEV_EVENT_CONNECTED event will be yielded when it is done connecting.

@param bufev an existing bufferevent allocated with bufferevent_socket_new(). @param addr the address we should connect to @param socklen The length of the address @return 0 on success, -1 on failure.

extern (C) nothrow
int
bufferevent_socket_connect
(,
sockaddr*
,
int
)

Meta