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
a50b0a0b
Commit
a50b0a0b
authored
Aug 28, 2020
by
captainwong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add static lib simple_libevent_server
parent
edea5c85
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
938 additions
and
0 deletions
+938
-0
Client.cpp
jlib/net/Client.cpp
+2
-0
Client.h
jlib/net/Client.h
+2
-0
Server.cpp
jlib/net/Server.cpp
+410
-0
Server.h
jlib/net/Server.h
+102
-0
simple_libevent_server.vcxproj
test/simple_libevent_server/simple_libevent_server.vcxproj
+175
-0
simple_libevent_server.vcxproj.filters
...le_libevent_server/simple_libevent_server.vcxproj.filters
+27
-0
simple_libevent_server.vcxproj.user
...imple_libevent_server/simple_libevent_server.vcxproj.user
+4
-0
test.sln
test/test.sln
+30
-0
test_client_and_server.cpp
test/test_client_and_server/test_client_and_server.cpp
+10
-0
test_client_and_server.vcxproj
test/test_client_and_server/test_client_and_server.vcxproj
+150
-0
test_client_and_server.vcxproj.filters
..._client_and_server/test_client_and_server.vcxproj.filters
+22
-0
test_client_and_server.vcxproj.user
...est_client_and_server/test_client_and_server.vcxproj.user
+4
-0
No files found.
jlib/net/Client.cpp
View file @
a50b0a0b
...
...
@@ -27,6 +27,7 @@
namespace
jlib
{
namespace
net
{
namespace
client
{
struct
OneTimeIniter
{
...
...
@@ -300,3 +301,4 @@ void Client::send(const char* data, size_t len)
}
}
}
jlib/net/Client.h
View file @
a50b0a0b
...
...
@@ -19,6 +19,7 @@
namespace
jlib
{
namespace
net
{
namespace
client
{
typedef
void
(
*
OnConnectinoCallback
)(
bool
up
,
const
std
::
string
&
msg
,
void
*
user_data
);
...
...
@@ -64,3 +65,4 @@ protected:
}
}
}
jlib/net/Server.cpp
0 → 100644
View file @
a50b0a0b
#include "Server.h"
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <event2/event.h>
#include <event2/buffer.h>
#include <event2/bufferevent.h>
#include <event2/listener.h>
#include <event2/thread.h>
#include <thread>
#include <mutex>
#include <algorithm>
#include <signal.h>
#include <inttypes.h>
#include "../log2.h"
namespace
jlib
{
namespace
net
{
namespace
server
{
struct
OneTimeIniter
{
OneTimeIniter
()
{
#ifdef _WIN32
WSADATA
wsa_data
;
WSAStartup
(
0x0201
,
&
wsa_data
);
if
(
0
!=
evthread_use_windows_threads
())
{
JLOG_CRTC
(
"failed to init libevent with thread by calling evthread_use_windows_threads"
);
exit
(
-
1
);
}
#else
if
(
0
!=
evthread_use_pthreads
())
{
JLOG_CRTC
(
"failed to init libevent with thread by calling evthread_use_pthreads"
);
exit
(
-
1
);
}
signal
(
SIGPIPE
,
SIG_IGN
);
#endif
}
};
static
std
::
string
eventToString
(
short
evs
)
{
std
::
string
s
;
#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
);
check_event_append_to_s
(
BEV_EVENT_ERROR
);
check_event_append_to_s
(
BEV_EVENT_TIMEOUT
);
check_event_append_to_s
(
BEV_EVENT_CONNECTED
);
#undef check_event_append_to_s
return
s
;
}
struct
BaseClientPrivateData
{
int
thread_id
=
0
;
void
*
bev
=
nullptr
;
void
*
timer
=
nullptr
;
std
::
chrono
::
steady_clock
::
time_point
lastTimeComm
=
{};
};
BaseClient
::
BaseClient
(
int
fd
,
void
*
bev
)
:
fd
(
fd
)
,
privateData
(
new
BaseClientPrivateData
())
{
((
BaseClientPrivateData
*
)
privateData
)
->
bev
=
bev
;
}
BaseClient
::~
BaseClient
()
{
delete
(
BaseClientPrivateData
*
)
privateData
;
}
BaseClient
*
BaseClient
::
createDefaultClient
(
int
fd
,
void
*
bev
)
{
BaseClient
*
client
=
new
BaseClient
(
fd
,
bev
);
return
client
;
}
void
BaseClient
::
send
(
const
void
*
data
,
size_t
len
)
{
if
(
!
((
BaseClientPrivateData
*
)
privateData
)
->
bev
)
{
JLOG_CRTC
(
"BaseClient::send bev is nullptr, #{}"
,
fd
);
return
;
}
auto
output
=
bufferevent_get_output
((
bufferevent
*
)((
BaseClientPrivateData
*
)
privateData
)
->
bev
);
if
(
!
output
)
{
JLOG_INFO
(
"BaseClient::send bev output nullptr, #{}"
,
fd
);
return
;
}
evbuffer_lock
(
output
);
evbuffer_add
(
output
,
data
,
len
);
evbuffer_unlock
(
output
);
}
void
BaseClient
::
shutdown
(
int
what
)
{
if
(
fd
!=
0
)
{
::
shutdown
(
fd
,
what
);
//fd = 0;
}
}
void
BaseClient
::
updateLastTimeComm
()
{
((
BaseClientPrivateData
*
)
privateData
)
->
lastTimeComm
=
std
::
chrono
::
steady_clock
::
now
();
}
struct
Server
::
PrivateImpl
{
struct
WorkerThreadContext
{
std
::
string
name
=
{};
int
thread_id
=
0
;
event_base
*
base
=
nullptr
;
std
::
thread
thread
=
{};
static
void
dummy_timercb_avoid_worker_exit
(
evutil_socket_t
,
short
,
void
*
)
{}
explicit
WorkerThreadContext
(
const
std
::
string
&
name
,
int
thread_id
)
:
name
(
name
)
,
thread_id
(
thread_id
)
{
thread
=
std
::
thread
(
&
WorkerThreadContext
::
worker
,
this
);
}
void
worker
()
{
JLOG_INFO
(
"{} WorkerThread #{} started"
,
name
.
data
(),
thread_id
);
base
=
event_base_new
();
timeval
tv
=
{
1
,
0
};
event_add
(
event_new
(
base
,
-
1
,
EV_PERSIST
,
dummy_timercb_avoid_worker_exit
,
nullptr
),
&
tv
);
event_base_dispatch
(
base
);
JLOG_INFO
(
"{} WorkerThread #{} exited"
,
name
.
data
(),
thread_id
);
}
static
void
readcb
(
struct
bufferevent
*
bev
,
void
*
user_data
)
{
char
buff
[
4096
];
auto
input
=
bufferevent_get_input
(
bev
);
Server
*
server
=
(
Server
*
)
user_data
;
if
(
server
->
userData_
&&
server
->
onMsg_
)
{
int
fd
=
(
int
)
bufferevent_getfd
(
bev
);
BaseClient
*
client
=
nullptr
;
{
std
::
lock_guard
<
std
::
mutex
>
lg
(
server
->
mutex
);
auto
iter
=
server
->
clients
.
find
(
fd
);
if
(
iter
!=
server
->
clients
.
end
())
{
client
=
iter
->
second
;
}
}
if
(
client
)
{
while
(
1
)
{
int
len
=
(
int
)
evbuffer_copyout
(
input
,
buff
,
std
::
min
(
sizeof
(
buff
),
evbuffer_get_length
(
input
)));
if
(
len
>
0
)
{
size_t
ate
=
server
->
onMsg_
(
buff
,
len
,
client
,
server
->
userData_
);
if
(
ate
>
0
)
{
evbuffer_drain
(
input
,
ate
);
continue
;
}
}
break
;
}
}
else
{
bufferevent_free
(
bev
);
}
}
else
{
evbuffer_drain
(
input
,
evbuffer_get_length
(
input
));
}
}
static
void
eventcb
(
struct
bufferevent
*
bev
,
short
events
,
void
*
user_data
)
{
Server
*
server
=
(
Server
*
)
user_data
;
//printf("eventcb events=%d %s\n", events, eventToString(events).data());
std
::
string
msg
;
if
(
events
&
(
BEV_EVENT_EOF
))
{
msg
=
(
"Connection closed"
);
}
else
if
(
events
&
BEV_EVENT_ERROR
)
{
msg
=
(
"Got an error on the connection: "
);
msg
+=
strerror
(
errno
);
}
if
(
server
->
userData_
&&
server
->
onConn_
)
{
int
fd
=
(
int
)
bufferevent_getfd
(
bev
);
BaseClient
*
client
=
nullptr
;
{
std
::
lock_guard
<
std
::
mutex
>
lg
(
server
->
mutex
);
auto
iter
=
server
->
clients
.
find
(
fd
);
if
(
iter
!=
server
->
clients
.
end
())
{
client
=
iter
->
second
;
}
else
{
JLOG_CRTC
(
"eventcb cannot find client by fd #{}"
,
(
int
)
fd
);
}
}
if
(
client
)
{
if
(((
BaseClientPrivateData
*
)
client
->
privateData
)
->
timer
)
{
event_del
((
event
*
)((
BaseClientPrivateData
*
)
client
->
privateData
)
->
timer
);
}
server
->
onConn_
(
false
,
msg
,
client
,
server
->
userData_
);
{
std
::
lock_guard
<
std
::
mutex
>
lg
(
server
->
mutex
);
server
->
clients
.
erase
(
fd
);
delete
client
;
}
}
}
bufferevent_free
(
bev
);
}
};
typedef
WorkerThreadContext
*
WorkerThreadContextPtr
;
PrivateImpl
(
void
*
user_data
)
:
user_data
(
user_data
)
{}
event_base
*
base
=
nullptr
;
void
*
user_data
=
nullptr
;
std
::
thread
thread
=
{};
timeval
tv
=
{};
WorkerThreadContextPtr
*
workerThreadContexts
=
{};
int
curWorkerId
=
0
;
static
void
accpet_error_cb
(
evconnlistener
*
listener
,
void
*
context
)
{
auto
base
=
evconnlistener_get_base
(
listener
);
int
err
=
EVUTIL_SOCKET_ERROR
();
JLOG_CRTC
(
"accpet_error_cb:{}:{}"
,
err
,
evutil_socket_error_to_string
(
err
));
event_base_loopexit
(
base
,
nullptr
);
}
static
void
timercb
(
evutil_socket_t
fd
,
short
,
void
*
user_data
)
{
auto
server
=
(
Server
*
)
user_data
;
std
::
lock_guard
<
std
::
mutex
>
lg
(
server
->
mutex
);
auto
iter
=
server
->
clients
.
find
((
int
)
fd
);
if
(
iter
!=
server
->
clients
.
end
())
{
auto
client
=
iter
->
second
;
auto
now
=
std
::
chrono
::
steady_clock
::
now
();
auto
diff
=
std
::
chrono
::
duration_cast
<
std
::
chrono
::
seconds
>
(
now
-
((
BaseClientPrivateData
*
)
client
->
privateData
)
->
lastTimeComm
);
if
(
diff
.
count
()
>
server
->
maxIdleTime_
)
{
JLOG_INFO
(
"{} client #{} timeout={}s > {}s, shutting down"
,
server
->
name_
,
client
->
fd
,
diff
.
count
(),
server
->
maxIdleTime_
);
((
BaseClientPrivateData
*
)
client
->
privateData
)
->
timer
=
nullptr
;
client
->
shutdown
();
}
else
{
((
BaseClientPrivateData
*
)
client
->
privateData
)
->
timer
=
event_new
(
server
->
impl
->
base
,
fd
,
0
,
timercb
,
server
);
event_add
((
event
*
)((
BaseClientPrivateData
*
)
client
->
privateData
)
->
timer
,
&
server
->
impl
->
tv
);
}
}
else
{
JLOG_CRTC
(
"timercb cannot find client by fd #{}"
,
(
int
)
fd
);
}
}
static
void
accept_cb
(
evconnlistener
*
listener
,
evutil_socket_t
fd
,
sockaddr
*
addr
,
int
socklen
,
void
*
user_data
)
{
char
str
[
INET_ADDRSTRLEN
]
=
{
0
};
auto
sin
=
(
sockaddr_in
*
)
addr
;
inet_ntop
(
AF_INET
,
&
sin
->
sin_addr
,
str
,
INET_ADDRSTRLEN
);
Server
*
server
=
(
Server
*
)
user_data
;
auto
ctx
=
server
->
impl
->
workerThreadContexts
[
server
->
impl
->
curWorkerId
];
auto
bev
=
bufferevent_socket_new
(
ctx
->
base
,
fd
,
BEV_OPT_CLOSE_ON_FREE
);
if
(
!
bev
)
{
JLOG_CRTC
(
"Error constructing bufferevent!"
);
exit
(
-
1
);
}
assert
(
server
->
newClient_
);
auto
client
=
server
->
newClient_
((
int
)
fd
,
bev
);
((
BaseClientPrivateData
*
)
client
->
privateData
)
->
thread_id
=
server
->
impl
->
curWorkerId
;
client
->
ip
=
str
;
client
->
port
=
sin
->
sin_port
;
client
->
updateLastTimeComm
();
((
BaseClientPrivateData
*
)
client
->
privateData
)
->
timer
=
event_new
(
ctx
->
base
,
fd
,
0
,
timercb
,
/*new TimerContext({ server, client })*/
server
);
event_add
((
event
*
)((
BaseClientPrivateData
*
)
client
->
privateData
)
->
timer
,
&
server
->
impl
->
tv
);
{
std
::
lock_guard
<
std
::
mutex
>
lg
(
server
->
mutex
);
server
->
clients
[(
int
)
fd
]
=
client
;
}
bufferevent_setcb
(
bev
,
WorkerThreadContext
::
readcb
,
nullptr
,
WorkerThreadContext
::
eventcb
,
server
);
bufferevent_enable
(
bev
,
EV_WRITE
|
EV_READ
);
if
(
server
->
userData_
&&
server
->
onConn_
)
{
server
->
onConn_
(
true
,
""
,
client
,
server
->
userData_
);
}
server
->
impl
->
curWorkerId
=
(
server
->
impl
->
curWorkerId
+
1
)
%
server
->
threadNum_
;
}
};
Server
::
Server
()
{
static
OneTimeIniter
initLibEvent
;
}
Server
::~
Server
()
{
stop
();
}
bool
Server
::
start
(
uint16_t
port
,
std
::
string
&
msg
)
{
do
{
stop
();
std
::
lock_guard
<
std
::
mutex
>
lg
(
mutex
);
impl
=
new
PrivateImpl
(
this
);
impl
->
base
=
event_base_new
();
if
(
!
impl
->
base
)
{
msg
=
"init libevent failed"
;
break
;
}
sockaddr_in
sin
=
{
0
};
sin
.
sin_family
=
AF_INET
;
sin
.
sin_addr
.
s_addr
=
htonl
(
INADDR_ANY
);
sin
.
sin_port
=
htons
(
port
);
auto
listener
=
evconnlistener_new_bind
(
impl
->
base
,
PrivateImpl
::
accept_cb
,
this
,
LEV_OPT_REUSEABLE
|
LEV_OPT_CLOSE_ON_FREE
,
-
1
,
// backlog, -1 for default
(
const
sockaddr
*
)(
&
sin
),
sizeof
(
sin
));
if
(
!
listener
)
{
JLOG_CRTC
(
"{} create listener failed"
,
name_
.
data
());
exit
(
-
1
);
}
evconnlistener_set_error_cb
(
listener
,
PrivateImpl
::
accpet_error_cb
);
// init common timeout
impl
->
tv
.
tv_sec
=
maxIdleTime_
;
impl
->
tv
.
tv_usec
=
0
;
const
struct
timeval
*
tv_out
=
event_base_init_common_timeout
(
impl
->
base
,
&
impl
->
tv
);
memcpy
(
&
impl
->
tv
,
tv_out
,
sizeof
(
struct
timeval
));
impl
->
thread
=
std
::
thread
([
this
]()
{
JLOG_INFO
(
"{} listen thread started"
,
name_
.
data
());
event_base_dispatch
(
this
->
impl
->
base
);
JLOG_INFO
(
"{} listen thread exited"
,
name_
.
data
());
});
impl
->
workerThreadContexts
=
new
PrivateImpl
::
WorkerThreadContextPtr
[
threadNum_
];
for
(
int
i
=
0
;
i
<
threadNum_
;
i
++
)
{
impl
->
workerThreadContexts
[
i
]
=
(
new
PrivateImpl
::
WorkerThreadContext
(
name_
,
i
));
}
started_
=
true
;
return
true
;
}
while
(
0
);
stop
();
return
false
;
}
void
Server
::
stop
()
{
std
::
lock_guard
<
std
::
mutex
>
lg
(
mutex
);
if
(
!
impl
)
{
return
;
}
if
(
impl
->
base
)
{
event_base_loopexit
(
impl
->
base
,
nullptr
);
}
if
(
impl
->
thread
.
joinable
())
{
impl
->
thread
.
join
();
}
if
(
impl
->
base
)
{
event_base_free
(
impl
->
base
);
impl
->
base
=
nullptr
;
}
for
(
int
i
=
0
;
i
<
threadNum_
;
i
++
)
{
event_base_loopexit
(
impl
->
workerThreadContexts
[
i
]
->
base
,
nullptr
);
}
for
(
int
i
=
0
;
i
<
threadNum_
;
i
++
)
{
impl
->
workerThreadContexts
[
i
]
->
thread
.
join
();
event_base_free
(
impl
->
workerThreadContexts
[
i
]
->
base
);
delete
impl
->
workerThreadContexts
[
i
];
}
delete
impl
->
workerThreadContexts
;
delete
impl
;
impl
=
nullptr
;
for
(
auto
client
:
clients
)
{
delete
client
.
second
;
}
clients
.
clear
();
started_
=
false
;
}
}
}
}
jlib/net/Server.h
0 → 100644
View file @
a50b0a0b
#
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 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
{
namespace
server
{
struct
BaseClient
{
explicit
BaseClient
(
int
fd
,
void
*
bev
);
virtual
~
BaseClient
();
static
BaseClient
*
createDefaultClient
(
int
fd
,
void
*
bev
);
void
send
(
const
void
*
data
,
size_t
len
);
void
shutdown
(
int
what
=
1
);
void
updateLastTimeComm
();
int
fd
=
0
;
std
::
string
ip
=
{};
uint16_t
port
=
0
;
void
*
privateData
=
nullptr
;
};
typedef
BaseClient
*
(
*
NewClientCallback
)(
int
fd
,
void
*
bev
);
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
);
class
Server
{
public
:
explicit
Server
();
virtual
~
Server
();
// these functions wont take effect after start() is called
void
setName
(
const
std
::
string
&
name
)
{
name_
=
name
;
}
void
setNewClientCallback
(
NewClientCallback
cb
)
{
assert
(
cb
);
newClient_
=
cb
?
cb
:
BaseClient
::
createDefaultClient
;
}
void
setUserData
(
void
*
d
)
{
userData_
=
d
;
}
void
setOnConnectionCallback
(
OnConnectinoCallback
cb
)
{
onConn_
=
cb
;
}
void
setOnMsgCallback
(
OnMessageCallback
cb
)
{
onMsg_
=
cb
;
}
void
setClientMaxIdleTime
(
int
sec
)
{
maxIdleTime_
=
sec
;
}
void
setThreadNum
(
int
threads
)
{
assert
(
threads
>=
1
);
if
(
threads
>=
1
)
{
threadNum_
=
threads
;
}
}
// call above functions before start()
bool
start
(
uint16_t
port
,
std
::
string
&
msg
);
void
stop
();
bool
isStarted
()
const
{
return
started_
;
}
protected
:
struct
PrivateImpl
;
PrivateImpl
*
impl
=
nullptr
;
std
::
string
name_
=
{};
bool
started_
=
false
;
void
*
userData_
=
nullptr
;
OnConnectinoCallback
onConn_
=
nullptr
;
OnMessageCallback
onMsg_
=
nullptr
;
NewClientCallback
newClient_
=
BaseClient
::
createDefaultClient
;
//! 客户端最长无数据时间
int
maxIdleTime_
=
5
;
//! 工作线程数量
int
threadNum_
=
1
;
std
::
mutex
mutex
=
{};
std
::
unordered_map
<
int
,
BaseClient
*>
clients
=
{};
};
}
}
}
test/simple_libevent_server/simple_libevent_server.vcxproj
0 → 100644
View file @
a50b0a0b
<?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\Server.cpp"
/>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"..\..\jlib\net\Server.h"
/>
</ItemGroup>
<PropertyGroup
Label=
"Globals"
>
<VCProjectVersion>
16.0
</VCProjectVersion>
<Keyword>
Win32Proj
</Keyword>
<ProjectGuid>
{c5a52a4b-ac5c-48fa-8356-2194170e674c}
</ProjectGuid>
<RootNamespace>
simplelibeventserver
</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>
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
NotUsing
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
<DebugInformationFormat>
ProgramDatabase
</DebugInformationFormat>
<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>
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>
<RuntimeLibrary>
MultiThreaded
</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
<Lib>
<AdditionalDependencies>
event_core.lib;%(AdditionalDependencies)
</AdditionalDependencies>
<AdditionalLibraryDirectories>
$(DEVLIBS)\libevent-2.1.12-stable-install\lib;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
_DEBUG;_LIB;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
Use
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
</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;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<PrecompiledHeader>
Use
</PrecompiledHeader>
<PrecompiledHeaderFile>
pch.h
</PrecompiledHeaderFile>
</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_server/simple_libevent_server.vcxproj.filters
0 → 100644
View file @
a50b0a0b
<?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\Server.cpp"
>
<Filter>
Source Files
</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude
Include=
"..\..\jlib\net\Server.h"
>
<Filter>
Header Files
</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
test/simple_libevent_server/simple_libevent_server.vcxproj.user
0 → 100644
View file @
a50b0a0b
<?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/test.sln
View file @
a50b0a0b
...
...
@@ -309,6 +309,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_stdutil_linux", "test_
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_libevent_client", "simple_libevent_client\simple_libevent_client.vcxproj", "{721A954E-B907-41C9-A30A-33E17F2449EE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simple_libevent_server", "simple_libevent_server\simple_libevent_server.vcxproj", "{C5A52A4B-AC5C-48FA-8356-2194170E674C}"
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
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
...
...
@@ -857,6 +861,30 @@ Global
{721A954E-B907-41C9-A30A-33E17F2449EE}.Release|x64.Build.0 = Release|x64
{721A954E-B907-41C9-A30A-33E17F2449EE}.Release|x86.ActiveCfg = Release|Win32
{721A954E-B907-41C9-A30A-33E17F2449EE}.Release|x86.Build.0 = Release|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Debug|ARM.ActiveCfg = Debug|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Debug|ARM64.ActiveCfg = Debug|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Debug|x64.ActiveCfg = Debug|x64
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Debug|x64.Build.0 = Debug|x64
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Debug|x86.ActiveCfg = Debug|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Debug|x86.Build.0 = Debug|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Release|ARM.ActiveCfg = Release|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Release|ARM64.ActiveCfg = Release|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Release|x64.ActiveCfg = Release|x64
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Release|x64.Build.0 = Release|x64
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Release|x86.ActiveCfg = Release|Win32
{C5A52A4B-AC5C-48FA-8356-2194170E674C}.Release|x86.Build.0 = Release|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Debug|ARM.ActiveCfg = Debug|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Debug|ARM64.ActiveCfg = Debug|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Debug|x64.ActiveCfg = Debug|x64
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Debug|x64.Build.0 = Debug|x64
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Debug|x86.ActiveCfg = Debug|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Debug|x86.Build.0 = Debug|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Release|ARM.ActiveCfg = Release|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Release|ARM64.ActiveCfg = Release|Win32
{A795FC0D-F05B-4B49-9957-E4A07A32427F}.Release|x64.ActiveCfg = Release|x64
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
@@ -931,6 +959,8 @@ Global
{897084E2-D24A-4350-95E6-5A0C204192A1} = {0E6598D3-602D-4552-97F7-DC5AB458D553}
{C5D81D57-C53B-4571-9A42-9620C5BE7919} = {ABCB8CF8-5E82-4C47-A0FC-E82DF105DF99}
{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}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A8EBEA58-739C-4DED-99C0-239779F57D5D}
...
...
test/test_client_and_server/test_client_and_server.cpp
0 → 100644
View file @
a50b0a0b
#include "../../jlib/net/Client.h"
#include "../../jlib/net/Server.h"
using
namespace
jlib
::
net
;
int
main
()
{
server
::
Server
server
;
client
::
Client
client
;
}
test/test_client_and_server/test_client_and_server.vcxproj
0 → 100644
View file @
a50b0a0b
<?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>
<PropertyGroup
Label=
"Globals"
>
<VCProjectVersion>
16.0
</VCProjectVersion>
<Keyword>
Win32Proj
</Keyword>
<ProjectGuid>
{a795fc0d-f05b-4b49-9957-e4a07a32427f}
</ProjectGuid>
<RootNamespace>
testclientandserver
</RootNamespace>
<WindowsTargetPlatformVersion>
10.0
</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.Default.props"
/>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseDebugLibraries>
true
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseDebugLibraries>
false
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<WholeProgramOptimization>
true
</WholeProgramOptimization>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</ConfigurationType>
<UseDebugLibraries>
true
</UseDebugLibraries>
<PlatformToolset>
v142
</PlatformToolset>
<CharacterSet>
Unicode
</CharacterSet>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|x64'"
Label=
"Configuration"
>
<ConfigurationType>
Application
</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>
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
<RuntimeLibrary>
MultiThreadedDebug
</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>
Console
</SubSystem>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
<AdditionalLibraryDirectories>
$(SolutionDir)$(Configuration)\;%(AdditionalLibraryDirectories)
</AdditionalLibraryDirectories>
<AdditionalDependencies>
simple_libevent_client.lib;simple_libevent_server.lib;%(AdditionalDependencies)
</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Release|Win32'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<FunctionLevelLinking>
true
</FunctionLevelLinking>
<IntrinsicFunctions>
true
</IntrinsicFunctions>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>
Console
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup
Condition=
"'$(Configuration)|$(Platform)'=='Debug|x64'"
>
<ClCompile>
<WarningLevel>
Level3
</WarningLevel>
<SDLCheck>
true
</SDLCheck>
<PreprocessorDefinitions>
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>
Console
</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;_CONSOLE;%(PreprocessorDefinitions)
</PreprocessorDefinitions>
<ConformanceMode>
true
</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>
Console
</SubSystem>
<EnableCOMDATFolding>
true
</EnableCOMDATFolding>
<OptimizeReferences>
true
</OptimizeReferences>
<GenerateDebugInformation>
true
</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile
Include=
"test_client_and_server.cpp"
/>
</ItemGroup>
<Import
Project=
"$(VCTargetsPath)\Microsoft.Cpp.targets"
/>
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
</Project>
\ No newline at end of file
test/test_client_and_server/test_client_and_server.vcxproj.filters
0 → 100644
View file @
a50b0a0b
<?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=
"test_client_and_server.cpp"
>
<Filter>
Source Files
</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
test/test_client_and_server/test_client_and_server.vcxproj.user
0 → 100644
View file @
a50b0a0b
<?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
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