no message

master
a7458969 2020-04-21 02:02:54 +08:00
parent 9cb120b79e
commit dbbad9be1e
6 changed files with 23 additions and 35 deletions

View File

@ -12,35 +12,12 @@
</component>
<component name="ChangeListManager">
<list default="true" id="0facce0d-c642-4d80-b2fb-daf5f3e68dff" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/test/src/tcpclient_test.cpp" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/include/inc/debug.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/include/inc/glad/include/KHR/khrplatform.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/include/inc/glad/include/glad/glad.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/include/inc/glad/src/glad.c" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/include/inc/loger.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/include/inc/utils.h" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent.dll.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent.la" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_core.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_core.dll.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_core.la" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_extra.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_extra.dll.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_extra.la" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_openssl.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_openssl.dll.a" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/libevent_openssl.la" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/pkgconfig/libevent.pc" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/pkgconfig/libevent_core.pc" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/pkgconfig/libevent_extra.pc" afterDir="false" />
<change afterPath="$PROJECT_DIR$/third/lib/pkgconfig/libevent_openssl.pc" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/net/TcpClient.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/TcpClient.cpp" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/net/TcpClient.h" beforeDir="false" afterPath="$PROJECT_DIR$/src/net/TcpClient.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/test/CMakeLists.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/src/tcpclient_test.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/test/src/tcpclient_test.cpp" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -140,7 +117,7 @@
<workItem from="1587146367315" duration="1596000" />
<workItem from="1587183781038" duration="13107000" />
<workItem from="1587266163206" duration="2365000" />
<workItem from="1587349363612" duration="13372000" />
<workItem from="1587349363612" duration="16126000" />
</task>
<servers />
</component>

View File

@ -49,6 +49,14 @@ message( "copy third library")
file(GLOB THIRD ${PROJECT_SOURCE_DIR}/third/include/*)
file(COPY ${THIRD} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/third/
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ)
message( "copy net ")
file(GLOB NET ${PROJECT_SOURCE_DIR}/src/net/*.h)
file(COPY ${NET} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/
FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ)
link_libraries(third/lib/libevent.a)
link_libraries(third/lib/libevent_core.a)
IF (WIN32)
ELSEIF (UNIX)

View File

@ -4,12 +4,7 @@
#include "TcpClient.h"
#include "third/include/event2/bufferevent.h"
#include "third/include/event2/buffer.h"
#include "third/include/event2/listener.h"
#include "third/include/event2/util.h"
#include "third/include/event2/event.h"
#include "third/include/event2/thread.h"
void conn_writecb(struct bufferevent *, void *);
void conn_readcb(struct bufferevent *, void *);

View File

@ -4,7 +4,14 @@
#ifndef GENERAL_TCPCLIENT_H
#define GENERAL_TCPCLIENT_H
extern "C"{
#include "third/include/event2/bufferevent.h"
#include "third/include/event2/buffer.h"
#include "third/include/event2/listener.h"
#include "third/include/event2/util.h"
#include "third/include/event2/event.h"
#include "third/include/event2/thread.h"
};
#include <iostream>
#include "PackageReceiver.h"
#include <mutex>

View File

@ -3,7 +3,9 @@ project(tcptest)
message("current dir" ${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../obj/inc)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../obj/)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../obj/inc/third/include)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../obj/)
link_libraries(libGeneral.a)
link_libraries(ws2_32)
add_executable(tcptest src/tcpclient_test.cpp)

View File

@ -1,6 +1,5 @@
#include "TcpClient.h"
int main(){
TcpClientLibevent mTcp;
TcpClientLibevent mTcp("127.0.0.1",8443, nullptr);
}