mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
fix run-http.bat
This commit is contained in:
parent
b0db8c4a2d
commit
4832dd19de
@ -21,9 +21,9 @@ if(WIN32)
|
||||
COMMENT "call quick start: ${CMAKE_BINARY_DIR}")
|
||||
|
||||
add_custom_target(run-http
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
DEPENDS HttpServer HttpClient
|
||||
COMMAND ../servant/script/busybox.exe bash ../examples/scripts/run-http.bat
|
||||
COMMAND servant/script/busybox.exe bash examples/scripts/run-http.bat ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "call run http")
|
||||
|
||||
add_custom_target(run-auth
|
||||
|
@ -1,19 +1,24 @@
|
||||
|
||||
echo "run-http.bat"
|
||||
|
||||
EXE_PATH=$1
|
||||
SRC_PATH=$2
|
||||
|
||||
echo ${EXE_PATH} ${SRC_PATH}
|
||||
|
||||
killall -9 HttpServer.exe
|
||||
sleep 1
|
||||
|
||||
echo "start server: .\\bin\\Release\\HttpServer.exe --config=..\\examples\\HttpDemo\\HttpServer\\config.conf &"
|
||||
echo "start server: ${EXE_PATH}/HttpServer.exe --config=${SRC_PATH}/examples/HttpDemo/HttpServer/config.conf &"
|
||||
|
||||
.\\bin\\Release\\HttpServer.exe --config=..\\examples\\HttpDemo\\HttpServer\\config.conf &
|
||||
${EXE_PATH}/HttpServer.exe --config=${SRC_PATH}/examples/HttpDemo/HttpServer/config.conf &
|
||||
|
||||
sleep 3
|
||||
|
||||
echo "client: .\\bin\\Release\\HttpClient.exe"
|
||||
echo "client: ${EXE_PATH}/HttpClient.exe"
|
||||
|
||||
.\\bin\\Release\\HttpClient.exe --count=10000 --thread=2 --call=basehttp
|
||||
.\\bin\\Release\\HttpClient.exe --count=10000 --thread=2 --call=synchttp
|
||||
${EXE_PATH}/HttpClient.exe --count=10000 --thread=2 --call=basehttp
|
||||
#${EXE_PATH}/HttpClient.exe --count=10000 --thread=2 --call=synchttp
|
||||
|
||||
sleep 1
|
||||
|
||||
|
@ -1857,7 +1857,7 @@ namespace tars
|
||||
throw TarsDecodeInvalidValue(ss);
|
||||
}
|
||||
TarsWriteToHead(*this, TarsHeadeString4, tag);
|
||||
uint32_t n = (uint32_t)htonl(s.size());
|
||||
uint32_t n = htonl((uint32_t)s.size());
|
||||
TarsWriteUInt32TTypeBuf(*this, n, (*this)._len);
|
||||
//this->writeBuf(s.data(), s.size());
|
||||
TarsWriteTypeBuf(*this, s.data(), s.size());
|
||||
@ -1865,7 +1865,7 @@ namespace tars
|
||||
else
|
||||
{
|
||||
TarsWriteToHead(*this, TarsHeadeString1, tag);
|
||||
uint8_t n = s.size();
|
||||
uint8_t n = (uint8_t)s.size();
|
||||
TarsWriteUInt8TTypeBuf(*this, n, (*this)._len);
|
||||
//this->writeBuf(s.data(), s.size());
|
||||
TarsWriteTypeBuf(*this, s.data(), s.size());
|
||||
@ -1887,7 +1887,7 @@ namespace tars
|
||||
//DataHead h(DataHead::eMap, tag);
|
||||
//h.writeTo(*this);
|
||||
TarsWriteToHead(*this, TarsHeadeMap, tag);
|
||||
Int32 n = m.size();
|
||||
Int32 n = (Int32)m.size();
|
||||
write(n, 0);
|
||||
typedef typename std::map<K, V, Cmp, Alloc>::const_iterator IT;
|
||||
for (IT i = m.begin(); i != m.end(); ++i)
|
||||
@ -1930,7 +1930,7 @@ namespace tars
|
||||
//hh.writeTo(*this);
|
||||
TarsWriteToHead(*this, TarsHeadeSimpleList, tag);
|
||||
TarsWriteToHead(*this, TarsHeadeChar, 0);
|
||||
Int32 n = v.size();
|
||||
Int32 n = (Int32)v.size();
|
||||
write(n, 0);
|
||||
//writeBuf(&v[0], v.size());
|
||||
TarsWriteTypeBuf(*this, &v[0], v.size());
|
||||
|
Loading…
Reference in New Issue
Block a user