FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
GameServerFramework/gatewayServer/gwMessageService.cpp at master · bbf97/GameServerFramework · GitHub
bbf97
/
GameServerFramework
Public
forked from
AtlasWing/GameServerFramework
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
GameServerFramework
/
gatewayServer
/
gwMessageService.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
100 lines (82 loc) · 2.58 KB
Breadcrumbs
GameServerFramework
/
gatewayServer
/
gwMessageService.cpp
Copy path
File metadata and controls
100 lines (82 loc) · 2.58 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#
include
"
protocol/forwardCommand.h
"
#
include
"
protocol/loginCommand.h
"
#
include
"
base/nServerConn.h
"
#
include
"
gatewayServer/gwMessageService.h
"
#
include
"
gatewayServer/gwServer.h
"
#
include
"
gatewayServer/gwUserTaskConn.h
"
#
include
"
gatewayServer/gwUser.h
"
#
include
"
gatewayServer/gwTelnetService.h
"
#
include
"
gatewayServer/gwUserService.h
"
#
include
"
gatewayServer/gwFilterService.h
"
gwMessageService::gwMessageService
()
{
}
gwMessageService::~gwMessageService
()
{
}
bool
gwMessageService::init
()
{
return
Game::nGameMessageService<gwMessageService>::
init
();
}
void
gwMessageService::final
()
{
}
bool
gwMessageService::sendCmdToZone
(
const
protocol::NullProtoCommand *cmd,
const
DWORD
len)
const
{
return
server->
sendCmdToZone
(cmd, len);
}
bool
gwMessageService::sendCmdToLogicByID
(
DWORD
serverID,
const
protocol::NullProtoCommand *cmd,
const
DWORD
len)
const
{
return
server->
sendCmdToClientConnByID
(serverID, cmd, len);
}
bool
gwMessageService::sendCmdToLogic
(
const
gwUser *user,
const
protocol::NullProtoCommand *cmd,
const
DWORD
len)
const
{
return
user->
sendCmdToLogic
(cmd, len);
}
bool
gwMessageService::sendPlatformCommandToServer
(Tidy::nServerConn* conn,
const
protocol::base::PlatformCommandBase* command,
const
DWORD
len)
const
{
BUFFER_PROTO_CMD
(protocol::forward::ForwardPlatformServerCommand, send);
assert_debug
(
PROTO_CMD_CAPACITY
(protocol::forward::ForwardPlatformServerCommand) >= len,
"
消息包超长[%u,%u]
"
,command->
cmd
,command->
param
);
send->
num
= len;
bcopy
(command, send->
data
, len);
return
conn->
sendCmd
(send, send->
size
());
}
void
gwMessageService::dealConnectSuccess
(Tidy::nServerConn* conn)
{
Game::nGameMessageService<gwMessageService>::
dealConnectSuccess
(conn);
switch
(conn->
getServerType
())
{
default
:
{
}
}
}
void
gwMessageService::dealConnectClose
(Tidy::nServerConn* conn)
{
Game::nGameMessageService<gwMessageService>::
dealConnectClose
(conn);
switch
(conn->
getServerType
())
{
default
:
{
}
}
}
bool
gwMessageService::parseServerCommand
(Tidy::nServerConn* serverConn,
const
protocol::NullProtoCommand *nullCommand,
const
DWORD
nCmdLen)
{
if
(
isGameServer
(serverConn->
getServerType
()) ==
true
) {
return
parseProtocolCmd
(serverConn, nullCommand, nCmdLen);
}
else
{
assert_fail
(
"
未处理服务器类型[%u]
"
, serverConn->
getServerType
());
}
return
true
;
}
bool
gwMessageService::doTick
()
{
return
true
;
}
bool
gwMessageService::startService
()
{
server->
debug
(
"
gwMessageServer初始化完成
"
);
return
true
;
}
Back
|
FazBrowse Home
|
New Git URL