Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
captainwong
jlib
Commits
1616119c
Commit
1616119c
authored
Sep 27, 2020
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simple libevent clients
parent
f3280df3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
823 additions
and
31 deletions
+823
-31
simple_libevent_client.cpp
jlib/net/simple_libevent_client.cpp
+2
-10
simple_libevent_client.h
jlib/net/simple_libevent_client.h
+20
-9
simple_libevent_clients.cpp
jlib/net/simple_libevent_clients.cpp
+450
-0
simple_libevent_clients.h
jlib/net/simple_libevent_clients.h
+109
-0
simple_libevent_micros.h
jlib/net/simple_libevent_micros.h
+2
-2
simple_libevent_server.cpp
jlib/net/simple_libevent_server.cpp
+2
-2
simple_libevent_server.h
jlib/net/simple_libevent_server.h
+3
-0
simple_libevent_client.vcxproj
test/simple_libevent_client/simple_libevent_client.vcxproj
+9
-4
simple_libevent_clients.vcxproj
test/simple_libevent_clients/simple_libevent_clients.vcxproj
+174
-0
simple_libevent_clients.vcxproj.filters
..._libevent_clients/simple_libevent_clients.vcxproj.filters
+27
-0
simple_libevent_clients.vcxproj.user
...ple_libevent_clients/simple_libevent_clients.vcxproj.user
+4
-0
simple_libevent_server.vcxproj
test/simple_libevent_server/simple_libevent_server.vcxproj
+6
-4
test.sln
test/test.sln
+15
-0
No files found.
jlib/net/simple_libevent_client.cpp
View file @
1616119c
#include "simple_libevent_client.h"
#ifdef _WIN32
#include <WinSock2.h>
#pragma comment(lib, "ws2_32.lib")
#else
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#endif
#include <errno.h>
#include <stdlib.h>
#include <string.h>
...
...
@@ -27,8 +18,10 @@
#ifndef JLIB_DISABLE_LOG
# ifdef SIMPLELIBEVENTCLIENTLIB
# include "../log2.h"
# include "simple_libevent_micros.h"
# else
# include <jlib/log2.h>
# include <jlib/net/simple_libevent_micros.h>
# endif
#else // JLIB_DISABLE_LOG
# ifdef SIMPLELIBEVENTCLIENTLIB
...
...
@@ -57,7 +50,6 @@ public:
# endif
#endif // JLIB_DISABLE_LOG
#include "simple_libevent_micros.h"
namespace
jlib
{
...
...
jlib/net/simple_libevent_client.h
View file @
1616119c
#
pragma
once
#ifndef _WIN32
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#else
# ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS
# endif
# ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
# define _WINSOCK_DEPRECATED_NO_WARNINGS
# endif
#ifndef NOMINMAX
#define NOMINMAX
# ifndef NOMINMAX
# define NOMINMAX
# endif
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
#include <WinSock2.h>
#pragma comment(lib, "ws2_32.lib")
#endif
#include <string>
...
...
jlib/net/simple_libevent_clients.cpp
0 → 100644
View file @
1616119c
This diff is collapsed.
Click to expand it.
jlib/net/simple_libevent_clients.h
0 → 100644
View file @
1616119c
#pragma once
#ifndef _WIN32
# include <unistd.h>
# include <netinet/in.h>
# include <arpa/inet.h>
# include <sys/socket.h>
#else
# ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS
# endif
# ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
# define _WINSOCK_DEPRECATED_NO_WARNINGS
# endif
# ifndef NOMINMAX
# define NOMINMAX
# endif
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <WinSock2.h>
# pragma comment(lib, "ws2_32.lib")
#endif
#include <stdint.h>
#include <string>
#include <mutex>
#include <unordered_map>
#include <chrono>
#include <assert.h>
namespace
jlib
{
namespace
net
{
class
simple_libevent_clients
{
public
:
struct
BaseClient
;
typedef
void
(
*
OnTimerCallback
)(
BaseClient
*
client
,
void
*
user_data
);
typedef
BaseClient
*
(
*
NewClientCallback
)();
typedef
void
(
*
OnConnectinoCallback
)(
bool
up
,
const
std
::
string
&
msg
,
BaseClient
*
client
,
void
*
user_data
);
// return > 0 for ate
// return 0 for stop
typedef
size_t
(
*
OnMessageCallback
)(
const
char
*
data
,
size_t
len
,
BaseClient
*
client
,
void
*
user_data
);
typedef
void
(
*
OnWriteCompleteCallback
)(
BaseClient
*
client
,
void
*
user_data
);
struct
BaseClient
{
explicit
BaseClient
();
virtual
~
BaseClient
();
static
BaseClient
*
createDefaultClient
();
int
thread_id
()
const
;
int
client_id
()
const
;
int
fd
()
const
;
bool
auto_reconnect
()
const
;
std
::
string
server_ip
()
const
;
int16_t
server_port
()
const
;
int
lifetime
()
const
;
void
send
(
const
void
*
data
,
size_t
len
);
void
shutdown
(
int
what
=
1
);
void
updateLastTimeComm
();
void
set_auto_reconnect
(
bool
b
);
void
set_timer
(
OnTimerCallback
cb
,
void
*
user_data
,
int
seconds
);
void
set_lifetime
(
int
seconds
);
struct
PrivateData
;
PrivateData
*
privateData
=
nullptr
;
};
public
:
explicit
simple_libevent_clients
(
OnConnectinoCallback
onConn
,
OnMessageCallback
onMsg
,
OnWriteCompleteCallback
onWrite
,
NewClientCallback
newClient
,
int
threads
,
void
*
user_data
,
const
std
::
string
&
name
=
{});
virtual
~
simple_libevent_clients
();
void
setUserData
(
void
*
user_data
)
{
userData_
=
user_data
;
}
bool
connect
(
const
std
::
string
&
ip
,
uint16_t
port
,
std
::
string
&
msg
);
void
exit
();
protected
:
struct
PrivateImpl
;
PrivateImpl
*
impl
=
nullptr
;
std
::
string
name_
{};
void
*
userData_
=
nullptr
;
OnConnectinoCallback
onConn_
=
nullptr
;
OnMessageCallback
onMsg_
=
nullptr
;
OnWriteCompleteCallback
onWrite_
=
nullptr
;
NewClientCallback
newClient_
=
BaseClient
::
createDefaultClient
;
//! ߳
int
threadNum_
=
1
;
int
curThreadId_
=
-
1
;
std
::
mutex
mutex_
{};
};
}
}
jlib/net/simple_libevent_micros.h
View file @
1616119c
...
...
@@ -5,7 +5,7 @@
struct
SimpleLibeventOneTimeInitHelper
{
SimpleLibeventOneTimeInitHelper
()
{
WSADATA
wsa_data
;
WSAStartup
(
0x020
1
,
&
wsa_data
);
WSAStartup
(
0x020
2
,
&
wsa_data
);
if
(
0
!=
evthread_use_windows_threads
())
{
JLOG_CRTC
(
"failed to init libevent with thread by calling evthread_use_windows_threads"
);
abort
();
...
...
@@ -41,7 +41,7 @@ namespace jlib {
namespace
net
{
inline
std
::
string
eventToString
(
short
evs
)
{
std
::
string
s
;
#define check_event_append_to_s(e) if
(evs & e){s += #e " ";
}
#define check_event_append_to_s(e) if
(evs & e) { s += #e " ";
}
check_event_append_to_s
(
BEV_EVENT_READING
);
check_event_append_to_s
(
BEV_EVENT_WRITING
);
check_event_append_to_s
(
BEV_EVENT_EOF
);
...
...
jlib/net/simple_libevent_server.cpp
View file @
1616119c
...
...
@@ -22,8 +22,10 @@
#ifndef JLIB_DISABLE_LOG
# ifdef SIMPLELIBEVENTSERVERLIB
# include "../log2.h"
# include "simple_libevent_micros.h"
# else
# include <jlib/log2.h>
# include <jlib/net/simple_libevent_micros.h>
# endif
#else // JLIB_DISABLE_LOG
# ifdef SIMPLELIBEVENTSERVERLIB
...
...
@@ -52,8 +54,6 @@ public:
# endif
#endif // JLIB_DISABLE_LOG
#include "simple_libevent_micros.h"
namespace
jlib
{
namespace
net
{
...
...
jlib/net/simple_libevent_server.h
View file @
1616119c
...
...
@@ -9,6 +9,9 @@
# ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS
# endif
# ifndef _WINSOCK_DEPRECATED_NO_WARNINGS
# define _WINSOCK_DEPRECATED_NO_WARNINGS
# endif
# ifndef NOMINMAX
# define NOMINMAX
# endif
...
...
test/simple_libevent_client/simple_libevent_client.vcxproj
View file @
1616119c
...
...
@@ -142,10 +142,11 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_DEBUG;_LIB;
SIMPLELIBEVENTCLIENTLIB;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
Use
</PrecompiledHeader>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
...
...
@@ -159,10 +160,11 @@
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
NDEBUG;_LIB;
SIMPLELIBEVENTCLIENTLIB;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
Use
</PrecompiledHeader>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
...
...
@@ -171,6 +173,9 @@
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
<Lib>
<AdditionalDependencies>
$(DEVLIBS)\libevent-2.1.12-stable-install-x64\lib\event_core.lib;%(AdditionalDependencies)
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
...
...
test/simple_libevent_clients/simple_libevent_clients.vcxproj
0 → 100644
View file @
1616119c
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup
Label=
"ProjectConfigurations"
>
<ProjectConfiguration
Include=
"Debug|Win32"
>
<Configuration>
Debug
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|Win32"
>
<Configuration>
Release
</Configuration>
<Platform>
Win32
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Debug|x64"
>
<Configuration>
Debug
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
<ProjectConfiguration
Include=
"Release|x64"
>
<Configuration>
Release
</Configuration>
<Platform>
x64
</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile
Include=
"..\..\jlib\net\simple_libevent_clients.cpp"
/>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"..\..\jlib\net\simple_libevent_clients.h"
/>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<VCProjectVersion>
16.0
</VCProjectVersion>
<Keyword>
Win32Proj
</Keyword>
<ProjectGuid>
{67920eb2-4d8b-4b74-9ec0-a62def03635b}
</ProjectGuid>
<RootNamespace>
simplelibeventclients
</RootNamespace>
<WindowsTargetPlatformVersion>
10.0
</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.Default.props"
/>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<UseDebugLibraries>
true
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<UseDebugLibraries>
true
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"Configuration"
>
<ConfigurationType>
StaticLibrary
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.props"
/>
<ImportGroup
Label=
"ExtensionSettings"
>
</ImportGroup>
<ImportGroup
Label=
"Shared"
>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<ImportGroup
Label=
"PropertySheets"
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<Import
Project=
"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
Condition=
"exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')"
Label=
"LocalAppDataPlatform"
/>
</ImportGroup>
<PropertyGroup
Label=
"UserMacros"
/>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<LinkIncremental>
true
</LinkIncremental>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<LinkIncremental>
false
</LinkIncremental>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<LinkIncremental>
true
</LinkIncremental>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<LinkIncremental>
false
</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
SIMPLELIBEVENTCLIENTSLIB;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
<Lib>
<AdditionalLibraryDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\lib;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<AdditionalDependencies>
event_core.lib;%(AdditionalDependencies)
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
SIMPLELIBEVENTCLIENTSLIB;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
<Lib>
<AdditionalLibraryDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\lib;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<AdditionalDependencies>
event_core.lib;%(AdditionalDependencies)
</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
_DEBUG;_LIB;SIMPLELIBEVENTCLIENTSLIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
NDEBUG;_LIB;SIMPLELIBEVENTCLIENTSLIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
\ No newline at end of file
test/simple_libevent_clients/simple_libevent_clients.vcxproj.filters
0 → 100644
View file @
1616119c
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"4.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<ItemGroup>
<Filter
Include=
"Source Files"
>
<UniqueIdentifier>
{4FC737F1-C7A5-4376-A066-2A32D752A2FF}
</UniqueIdentifier>
<Extensions>
cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
</Extensions>
</Filter>
<Filter
Include=
"Header Files"
>
<UniqueIdentifier>
{93995380-89BD-4b04-88EB-625FBE52EBFB}
</UniqueIdentifier>
<Extensions>
h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
</Extensions>
</Filter>
<Filter
Include=
"Resource Files"
>
<UniqueIdentifier>
{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
</UniqueIdentifier>
<Extensions>
rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile
Include=
"..\..\jlib\net\simple_libevent_clients.cpp"
>
<Filter>
Source Files
</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"..\..\jlib\net\simple_libevent_clients.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
test/simple_libevent_clients/simple_libevent_clients.vcxproj.user
0 → 100644
View file @
1616119c
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup
/>
</Project>
\ No newline at end of file
test/simple_libevent_server/simple_libevent_server.vcxproj
View file @
1616119c
...
...
@@ -139,10 +139,11 @@
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
_DEBUG;_LIB;
SIMPLELIBEVENTSERVERLIB;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
Use
</PrecompiledHeader>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
...
...
@@ -156,10 +157,11 @@
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
NDEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<PreprocessorDefinitions>
NDEBUG;_LIB;
SIMPLELIBEVENTSERVERLIB;
%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
Use
</PrecompiledHeader>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\include;%(AdditionalIncludeDirectories)
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>
...
...
test/test.sln
View file @
1616119c
...
...
@@ -318,6 +318,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_libevent_server", "s
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_client_and_server", "test_client_and_server\test_client_and_server.vcxproj", "{A795FC0D-F05B-4B49-9957-E4A07A32427F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_libevent_clients", "simple_libevent_clients\simple_libevent_clients.vcxproj", "{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
...
...
@@ -890,6 +892,18 @@ Global
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Release|x64.Build.0 = Release|x64
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Release|x86.ActiveCfg = Release|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Release|x86.Build.0 = Release|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Debug|ARM.ActiveCfg = Debug|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Debug|ARM64.ActiveCfg = Debug|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Debug|x64.ActiveCfg = Debug|x64
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Debug|x64.Build.0 = Debug|x64
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Debug|x86.ActiveCfg = Debug|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Debug|x86.Build.0 = Debug|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Release|ARM.ActiveCfg = Release|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Release|ARM64.ActiveCfg = Release|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Release|x64.ActiveCfg = Release|x64
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Release|x64.Build.0 = Release|x64
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Release|x86.ActiveCfg = Release|Win32
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
@@ -966,6 +980,7 @@ Global
{721A954E-B907-41C9-A30A-33E17F2449EE} = {729A65CE-3F07-4C2E-ACDC-F9EEC6477F2A}
{C5A52A4B-AC5C-48FA-8356-2194170E674C} = {729A65CE-3F07-4C2E-ACDC-F9EEC6477F2A}
{A795FC0D-F05B-4B49-9957-E4A07A32427F} = {77DBD16D-112C-448D-BA6A-CE566A9331FC}
{67920EB2-4D8B-4B74-9EC0-A62DEF03635B} = {729A65CE-3F07-4C2E-ACDC-F9EEC6477F2A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A8EBEA58-739C-4DED-99C0-239779F57D5D}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment