Libevent2 Server HTTP callback inside get client side IP, port, fd wait

Source: Internet
Author: User

Write this is mainly to prevent forgetting, fast memory.
Libevent2 Server HTTP callback inside get client side IP, port, FD, etc., in http_internal.h file, struct evhttp_connection inside
, you can directly save the struct evhttp *request inside the HTTP callback, as long as the evhttp_send_reply () client file descriptor is not closed in the callback, and the HTTP callback is not released after the end of the call. Evhttp_send is invoked to invoke Evhttp_write_buffer only when the evhttp_send_reply is invoked. into the buffer. When the data is sent from the buffer, the Evhttp_send_done is invoked, and then the Evhttp_request_free is called, which is released

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.