Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Devious2
@Devious2
Hi all,
i wanted to know can i use lievhtp with project which is built on Visual studio ?
Devious2
@Devious2
Hi,
can someone please tell me which mingw i should install on windows ? it should be mingw or mingw-64
Devious2
@Devious2

@kishans12 did you make the cmake find libevent?

@azat I guess he meant to say in cmake-gui option of LIBEVENT_THREAD is there where we have to fill the path location but libevent doesn't contain anything related to LIBEVENT_THREAD

image.png
Devious2
@Devious2
On command prompt i am getting CMake Error: CMake was unable to find a build program corresponding to "MSYS Mak
efiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a differen
t build tool.
Devious2
@Devious2
${LIBEVENT_THREAD} got this in FindLibevent.cmake
I think this is an issue because it is expecting pthread and since i have build libevent on windows it won't get it
if (NOT EVHTP_DISABLE_EVTHR)
find_library (LIBEVENT_THREAD NAMES event_pthreads)
endif()
this is in findlibevent.cmake
Azat Khuzhin
@azat

and since i have build libevent on windows it won't get it

Indeed, and you can fix this with the following patch:

diff --git a/cmake/FindLibEvent.cmake b/cmake/FindLibEvent.cmake
index 0dc4b33..4fa837e 100644
--- a/cmake/FindLibEvent.cmake
+++ b/cmake/FindLibEvent.cmake
@@ -11,7 +11,9 @@ find_library  (LIBEVENT_CORE        NAMES event_core)
 find_library  (LIBEVENT_EXTRA       NAMES event_extra)

 if (NOT EVHTP_DISABLE_EVTHR)
-    find_library (LIBEVENT_THREAD   NAMES event_pthreads)
+    if (NOT WIN32)
+        find_library (LIBEVENT_THREAD   NAMES event_pthreads)
+    endif()
 endif()

 if (NOT EVHTP_DISABLE_SSL)
Devious2
@Devious2
Thank you @azat
Devious2
@Devious2
when started to do make got following error i:/LibeventNLibevhtp/libevhtp/evhtp.c:3976:26: error: 'EOPNOTSUPP' undeclared (first use in this function) if (errno != EOPNOTSUPP) {
error: 'IPV6_V6ONLY' undeclared (first use in this function) if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) == -1) {
i am building using mingw as said on github on windows.
Any help would be appreciated
Devious2
@Devious2
errorno.h of mingw doesn't contain
#ifndef EOPNOTSUPP #define EOPNOTSUPP 130 #endif
Devious2
@Devious2
i have manually added definitions and percentage of compilation increased
but while compiling log.c it gives <arpa/inet.h> not found
and mingw does not contain arpa/inet.h
Devious2
@Devious2
#include <arpa/inet.h>
and there is no switch to for win32 and linux
Devious2
@Devious2
Hi @azat can you please give your inputs on this?
Devious2
@Devious2
Hi @azat @NathanFrench log.c is not cross platform . I have raised the issue on github.
Devious2
@Devious2
able to build it on windows but using cygwin. It would be great if you can fix for mingw
Devious2
@Devious2
Perfectly working using cygwin
Devious2
@Devious2
image.png
hi can anyone help me with this
here on browser i am hitting five request and i have put sleep of 5 seconds
so when 5 requests get hit only 2 thread get the work done mostly
whereas when i hit using JMeter all thread get the request
image.png
this is when i hit using Jmeter all five thread get the request
Devious2
@Devious2
here i am sending 10 requests from JMeter
image.png
where as when i send only 5 requests from JMeter first 3 requests are handled by 3 threads but 4th and 5th request is handled by 1st and 2nd thread but after 5 seconds
it should had given the requests to other two threads right ?which are free instead of waiting for the threads which are busy
Azat Khuzhin
@azat

it should had given the requests to other two threads right ?

It is not strictly defined. You can try compiling libevhtp with EVHTP_THR_SHARED_PIPE enabled (i.e. -DEVHTP_THR_SHARED_PIPE=ON) but it is unlikely that this will change anything

You can take a look at the underlying "scheduler" here - https://github.com/criticalstack/libevhtp/blob/f78d0a86778e277c75c8d0c14e7256bafb4b37e8/thread.c#L111

Devious2
@Devious2
Thank you so much @azat for reverting will surely try this
Devious2
@Devious2
No luck @azat
image.png
same thread handling all the request
Devious2
@Devious2
Hi @azat can you please recommend other library which i can use for task like this
??
coz libevhtp is failing on browser but working using JMeter
Devious2
@Devious2
Can anyone suggest any library which will work perfectly for production
Marwan Rabbâa
@waghanza
hi @/all, could libevhtp be compiled on alpine ?
Devious2
@Devious2
Can anyone help coz i am in mess currently
Devious2
@Devious2
can anyone help with this