Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
YGOPRO-520DIY
ygopro
Commits
1e1b0da8
Commit
1e1b0da8
authored
Dec 07, 2024
by
Chen Bill
Committed by
GitHub
Dec 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DuelClient: move protected members to private (#2630)
* DuelClient: move protected members to private * use intptr_t
parent
49aa79af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/duelclient.h
gframe/duelclient.h
+7
-8
No files found.
gframe/duelclient.cpp
View file @
1e1b0da8
...
...
@@ -118,9 +118,9 @@ void DuelClient::ClientRead(bufferevent* bev, void* ctx) {
}
delete
[]
duel_client_read
;
}
void
DuelClient
::
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
)
{
void
DuelClient
::
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
)
{
if
(
events
&
BEV_EVENT_CONNECTED
)
{
bool
create_game
=
(
size_t
)
ctx
!=
0
;
bool
create_game
=
(
intptr_t
)
ctx
;
CTOS_PlayerInfo
cspi
;
BufferIO
::
CopyCharArray
(
mainGame
->
ebNickName
->
getText
(),
cspi
.
name
);
SendPacketToServer
(
CTOS_PLAYER_INFO
,
cspi
);
...
...
gframe/duelclient.h
View file @
1e1b0da8
...
...
@@ -31,13 +31,18 @@ private:
static
unsigned
int
last_successful_msg_length
;
static
wchar_t
event_string
[
256
];
static
mt19937
rnd
;
static
bool
is_refreshing
;
static
int
match_kill
;
static
event
*
resp_event
;
static
std
::
set
<
std
::
pair
<
unsigned
int
,
unsigned
short
>>
remotes
;
public:
static
unsigned
char
selftype
;
static
bool
StartClient
(
unsigned
int
ip
,
unsigned
short
port
,
bool
create_game
=
true
);
static
void
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
);
static
void
StopClient
(
bool
is_exiting
=
false
);
static
void
ClientRead
(
bufferevent
*
bev
,
void
*
ctx
);
static
void
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
);
static
void
ClientEvent
(
bufferevent
*
bev
,
short
events
,
void
*
ctx
);
static
int
ClientThread
();
static
void
HandleSTOCPacketLan
(
unsigned
char
*
data
,
int
len
);
static
int
ClientAnalyze
(
unsigned
char
*
msg
,
unsigned
int
len
);
...
...
@@ -73,13 +78,7 @@ public:
std
::
memcpy
(
p
,
buffer
,
blen
);
bufferevent_write
(
client_bev
,
duel_client_write
,
blen
+
3
);
}
protected:
static
bool
is_refreshing
;
static
int
match_kill
;
static
event
*
resp_event
;
static
std
::
set
<
std
::
pair
<
unsigned
int
,
unsigned
short
>>
remotes
;
public:
static
std
::
vector
<
HostPacket
>
hosts
;
static
void
BeginRefreshHost
();
static
int
RefreshThread
(
event_base
*
broadev
);
...
...
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