## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
Marwan Rabbâa
@waghanza
how can I force route to inject a numerical id ?
I mean define a route that can handle /user/1, /user/2 ... but not /user/foo ?
Devious2
@Devious2
hi,
in examples thread_design.c is present but when we run make examples thread_design.c doesn't get build nor it shows build failed or anything
Azat Khuzhin
@azat
@Devious2 there is no target in cmake rules for it, you can add it by yourself, here https://github.com/criticalstack/libevhtp/blob/develop/examples/CMakeLists.txt
kishan
@kishans12
Hi @azat I am building libevhtp on windows using mingw but it cannot find my libevent libraries giving me (missing: LIBEVENT_LIBRARIES)
this is my query
"D:\cmakegui\cmake-3.15.1-win64-x64\bin\cmake.exe -G "MSYS Makefiles" -DCMAKE_INCLUDE_PATH=C:\MinGW\include -DCMAKE_LIBRARY_PATH=C:\MinGW\lib -DLIBEVENT_LIBRARIES=D:\Libevent\libevent-master\bin\Debug -DLIBEVENT_INCLUDE_DIR=D:\Libevent\libevent-master\include -DONIGURUMA_LIBRARY=D:\Oniguruma\oniguruma-master\Debug -DONIGURUMA_INCLUDE_DIR=D:\Oniguruma\oniguruma-master\src -DCMAKE_INSTALL_PREFIX=/mingw .."
i have build libevent on 64 bit
i have given in my query path to libevent libraries
kishan
@kishans12
what to set in LIBEVENT_THREAD as i cannot find anything in Libevent related to Libevent_thread?
Azat Khuzhin
@azat
@kishans12 did you make the cmake find libevent?
Actually I think @NathanFrench can answer questions regarding libevhtp
As for
LIBEVENT_THREAD, I don't see such option in
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

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
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)
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)
+    if (NOT WIN32)
+    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
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
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
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
this is when i hit using Jmeter all five thread get the request
Devious2
@Devious2
here i am sending 10 requests from JMeter
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