-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expose evhttp_get_request to user #1471
expose evhttp_get_request to user #1471
Comments
I have the same needs |
@MBeanwenshengming I'm not sure that it worth to export this internal function, so is there any reason for not using multiple http servers per-thread with |
Before using the http protocol, I need to detect the other network protocols. |
@widgetii what do you think about exporting this function? |
@azat My needs are essentially the same with mllw, export evhttp_get_request to user, It can make the user more flexible. thanks! |
I have no objections personally if it helps to our library users |
Ok, let's do this. And since we have a real users, @MBeanwenshengming or @mllw can you submit a pull request that will export it and also add some unit test with some real example into test/regress_http.c? |
I added a one by one function based on 4d85d28 and patched it, now it works fine, you can simply add this patch to vcpkg to use it。 in vcpkg ports/libevent/portfile.cmake |
I think expose evhttp_get_request_bufferevent is better than evhttp_get_request |
i just add a export function to http.h EVENT2_EXPORT_SYMBOL add the following code to http.c void evhttp_get_request_app(struct evhttp* http, evutil_socket_t fd, I'm not very familiar with libevent but the code can work i just want to call evhttp_get_request |
We heed to have unit test as well. |
So there are two different things:
So if someone needs #479, I'm not against it, but some example should be submitted, otherwise we can keep code that nobody uses. |
can you expose evhttp_get_request to user?
i have a listen thread and some work threads, work threads(IO thread) use evhttp_new create http server
my listen thread send socket to work threads by load, work thread use evhttp_get_request create http service(i modify it local)
i mainly use libevent for websocket.
thank you!!
The text was updated successfully, but these errors were encountered: