I'm using the following to connect to my server:
$ printf "GET / HTTP/1.0 \r\n\r\n" | openssl s_client -connect localhost:8443
19 bytes are read in the callback, and that's the length of the string
in the printf above.
But the following is returning -1 for pos:
size_t len = 0;
evbuffer_ptr loc;
memset(&loc, 0x00, sizeof(loc));
evbuffer* c_buf = bufferevent_get_input(bev);
ASSERT(c_buf);
loc = evbuffer_search_eol(c_buf, &loc, &len, EVBUFFER_EOL_CRLF);
if (loc.pos == -1)
{
/* No CRLF found */
return 0;
}
Any ideas what I am doing wrong?
***********************************************************************
To unsubscribe, send an e-mail to [email protected] with
unsubscribe libevent-users in the body.