Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_Today
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
FMVip_Today
Commits
8babe50f
Commit
8babe50f
authored
Sep 18, 2016
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes: 1.去除 GetThreadId 调用
parent
298b1ad8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
FMVipDC/fmsockserver.cpp
+4
-4
FMVipDC/fmsockserver.h
+1
-0
No files found.
FMVipDC/fmsockserver.cpp
View file @
8babe50f
...
...
@@ -3,6 +3,7 @@
FMSockServer
::
FMSockServer
(
FMApiRelay
*
relay
)
:
_worker
(
0
),
_worker_tid
(
0
),
_port
(
0
),
_relay
(
relay
)
{
...
...
@@ -44,9 +45,8 @@ FMSockServer::~FMSockServer()
VOID
FMSockServer
::
Listen
(
USHORT
port
)
{
_port
=
port
;
DWORD
tid
=
0
;
_worker
=
CreateThread
(
NULL
,
0
,
FMSockServer
::
RecvWorker
,
this
,
0
,
&
tid
);
FMLOG
(
_T
(
"Server thread %ld started."
),
tid
);
_worker
=
CreateThread
(
NULL
,
0
,
FMSockServer
::
RecvWorker
,
this
,
0
,
&
_worker_tid
);
FMLOG
(
_T
(
"Server thread %ld started."
),
_worker_tid
);
}
...
...
@@ -57,7 +57,7 @@ BOOL FMSockServer::Stop()
WaitForSingleObject
(
_worker
,
INFINITE
);
CloseHandle
(
_worker
);
FMLOG
(
_T
(
"Server thread %ld stopped. exit."
),
GetThreadId
(
_worker
)
);
FMLOG
(
_T
(
"Server thread %ld stopped. exit."
),
_worker_tid
);
return
TRUE
;
}
...
...
FMVipDC/fmsockserver.h
View file @
8babe50f
...
...
@@ -72,6 +72,7 @@ private:
USHORT
_port
;
sockaddr_in
_addr_in
;
HANDLE
_worker
;
DWORD
_worker_tid
;
FMApiRelay
*
_relay
;
CRITICAL_SECTION
_cs
;
...
...
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