author | unc0rr |
Wed, 18 Nov 2015 22:18:39 +0300 | |
branch | qmlfrontend |
changeset 11413 | ffff8a0d1a76 |
parent 10953 | 360e57620df3 |
child 11415 | 05cf35103206 |
permissions | -rw-r--r-- |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
1 |
unit uFLNetProtocol; |
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
2 |
interface |
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
3 |
|
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
4 |
procedure passNetData(p: pointer); cdecl; |
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
5 |
|
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
6 |
implementation |
11413
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
7 |
uses uFLNetTypes, uFLTypes, uFLUICallback, uFLNet; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
8 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
9 |
type |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
10 |
PHandler = procedure (var t: TCmdData); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
11 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
12 |
procedure handler_ASKPASSWORD(var p: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
13 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
14 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
15 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
16 |
procedure handler_BANLIST(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
17 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
18 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
19 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
20 |
procedure handler_BANLIST_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
21 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
22 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
23 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
24 |
procedure handler_BYE(var p: TCmdParamSL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
25 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
26 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
27 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
28 |
procedure handler_CHAT(var p: TCmdParamSL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
29 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
30 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
31 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
32 |
procedure handler_CLIENT_FLAGS(var p: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
33 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
34 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
35 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
36 |
procedure handler_CLIENT_FLAGS_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
37 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
38 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
39 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
40 |
procedure handler_CONNECTED(var p: TCmdParami); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
41 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
42 |
writeln('Connected!!!!! ', p.param1) |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
43 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
44 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
45 |
procedure handler_EM(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
46 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
47 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
48 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
49 |
procedure handler_EM_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
50 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
51 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
52 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
53 |
procedure handler_ERROR(var p: TCmdParamL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
54 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
55 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
56 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
57 |
procedure handler_HH_NUM(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
58 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
59 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
60 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
61 |
procedure handler_HH_NUM_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
62 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
63 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
64 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
65 |
procedure handler_INFO(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
66 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
67 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
68 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
69 |
procedure handler_INFO_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
70 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
71 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
72 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
73 |
procedure handler_JOINED(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
74 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
75 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
76 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
77 |
procedure handler_JOINED_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
78 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
79 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
80 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
81 |
procedure handler_JOINING(var p: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
82 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
83 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
84 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
85 |
procedure handler_KICKED(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
86 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
87 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
88 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
89 |
procedure handler_LEFT(var p: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
90 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
91 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
92 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
93 |
procedure handler_LEFT_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
94 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
95 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
96 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
97 |
procedure handler_LOBBY_JOINED(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
98 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
99 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
100 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
101 |
procedure handler_LOBBY_JOINED_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
102 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
103 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
104 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
105 |
procedure handler_LOBBY_LEFT(var p: TCmdParamSL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
106 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
107 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
108 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
109 |
procedure handler_NICK(var p: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
110 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
111 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
112 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
113 |
procedure handler_NOTICE(var p: TCmdParamL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
114 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
115 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
116 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
117 |
procedure handler_PING(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
118 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
119 |
sendNet('PONG') |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
120 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
121 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
122 |
procedure handler_PING_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
123 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
124 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
125 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
126 |
procedure handler_PROTO(var p: TCmdParami); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
127 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
128 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
129 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
130 |
procedure handler_ROOMS(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
131 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
132 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
133 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
134 |
procedure handler_ROOMS_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
135 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
136 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
137 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
138 |
procedure handler_ROUND_FINISHED(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
139 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
140 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
141 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
142 |
procedure handler_RUN_GAME(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
143 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
144 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
145 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
146 |
procedure handler_SERVER_AUTH(var p: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
147 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
148 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
149 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
150 |
procedure handler_SERVER_MESSAGE(var p: TCmdParamL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
151 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
152 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
153 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
154 |
procedure handler_SERVER_VARS(var p: TCmdParamSL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
155 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
156 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
157 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
158 |
procedure handler_TEAM_ACCEPTED(var p: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
159 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
160 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
161 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
162 |
procedure handler_TEAM_COLOR(var p: TCmdParam); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
163 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
164 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
165 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
166 |
procedure handler_TEAM_COLOR_s(var s: TCmdParamS); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
167 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
168 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
169 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
170 |
procedure handler_WARNING(var p: TCmdParamL); |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
171 |
begin |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
172 |
end; |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
173 |
|
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
174 |
const handlers: array[TCmdType] of PHandler = (PHandler(@handler_ASKPASSWORD), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
175 |
PHandler(@handler_BANLIST), PHandler(@handler_BANLIST_s), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
176 |
PHandler(@handler_BYE), PHandler(@handler_CHAT), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
177 |
PHandler(@handler_CLIENT_FLAGS), PHandler(@handler_CLIENT_FLAGS_s), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
178 |
PHandler(@handler_CONNECTED), PHandler(@handler_EM), PHandler(@handler_EM_s), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
179 |
PHandler(@handler_ERROR), PHandler(@handler_HH_NUM), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
180 |
PHandler(@handler_HH_NUM_s), PHandler(@handler_INFO), PHandler(@handler_INFO_s), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
181 |
PHandler(@handler_JOINED), PHandler(@handler_JOINED_s), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
182 |
PHandler(@handler_JOINING), PHandler(@handler_KICKED), PHandler(@handler_LEFT), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
183 |
PHandler(@handler_LEFT_s), PHandler(@handler_LOBBY_JOINED), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
184 |
PHandler(@handler_LOBBY_JOINED_s), PHandler(@handler_LOBBY_LEFT), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
185 |
PHandler(@handler_NICK), PHandler(@handler_NOTICE), PHandler(@handler_PING), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
186 |
PHandler(@handler_PING_s), PHandler(@handler_PROTO), PHandler(@handler_ROOMS), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
187 |
PHandler(@handler_ROOMS_s), PHandler(@handler_ROUND_FINISHED), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
188 |
PHandler(@handler_RUN_GAME), PHandler(@handler_SERVER_AUTH), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
189 |
PHandler(@handler_SERVER_MESSAGE), PHandler(@handler_SERVER_VARS), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
190 |
PHandler(@handler_TEAM_ACCEPTED), PHandler(@handler_TEAM_COLOR), |
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
191 |
PHandler(@handler_TEAM_COLOR_s), PHandler(@handler_WARNING)); |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
192 |
|
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
193 |
procedure passNetData(p: pointer); cdecl; |
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
194 |
begin |
11413
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
195 |
handlers[TCmdData(p^).cmd.cmd](TCmdData(p^)) |
10951
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
196 |
end; |
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
197 |
|
89a7f617e091
- Move protocol handling events to main thread through qt's main loop
unc0rr
parents:
diff
changeset
|
198 |
end. |
11413
ffff8a0d1a76
Implement processing net commands in the main thread
unc0rr
parents:
10953
diff
changeset
|
199 |