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
882d8a33
Commit
882d8a33
authored
Jun 18, 2025
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment
parent
e60bdd08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-2
gframe/network.h
gframe/network.h
+1
-1
No files found.
gframe/duelclient.cpp
View file @
882d8a33
...
@@ -123,9 +123,9 @@ void DuelClient::ClientEvent(bufferevent* bev, short events, void* ctx) {
...
@@ -123,9 +123,9 @@ void DuelClient::ClientEvent(bufferevent* bev, short events, void* ctx) {
auto
hostname_len
=
BufferIO
::
CopyCharArray
(
mainGame
->
ebJoinHost
->
getText
(),
hostname_buf
);
auto
hostname_len
=
BufferIO
::
CopyCharArray
(
mainGame
->
ebJoinHost
->
getText
(),
hostname_buf
);
auto
hostname_msglen
=
(
hostname_len
+
1
)
*
sizeof
(
uint16_t
);
auto
hostname_msglen
=
(
hostname_len
+
1
)
*
sizeof
(
uint16_t
);
char
buf
[
LEN_HOSTNAME
*
sizeof
(
int16_t
)
+
sizeof
(
uint32_t
)];
char
buf
[
LEN_HOSTNAME
*
sizeof
(
int16_t
)
+
sizeof
(
uint32_t
)];
memset
(
buf
,
0
,
sizeof
(
uint32_t
));
memset
(
buf
,
0
,
sizeof
(
uint32_t
));
// real_ip
memcpy
(
buf
+
sizeof
(
uint32_t
),
hostname_buf
,
hostname_msglen
);
memcpy
(
buf
+
sizeof
(
uint32_t
),
hostname_buf
,
hostname_msglen
);
DuelClient
::
SendBufferToServer
(
CTOS_EXTERNAL_ADDRESS
,
buf
,
hostname_msglen
+
sizeof
(
uint32_t
));
SendBufferToServer
(
CTOS_EXTERNAL_ADDRESS
,
buf
,
hostname_msglen
+
sizeof
(
uint32_t
));
}
}
CTOS_PlayerInfo
cspi
;
CTOS_PlayerInfo
cspi
;
BufferIO
::
CopyCharArray
(
mainGame
->
ebNickName
->
getText
(),
cspi
.
name
);
BufferIO
::
CopyCharArray
(
mainGame
->
ebNickName
->
getText
(),
cspi
.
name
);
...
...
gframe/network.h
View file @
882d8a33
...
@@ -105,7 +105,7 @@ static_assert(sizeof(CTOS_Kick) == 1, "size mismatch: CTOS_Kick");
...
@@ -105,7 +105,7 @@ static_assert(sizeof(CTOS_Kick) == 1, "size mismatch: CTOS_Kick");
/*
/*
* CTOS_ExternalAddress
* CTOS_ExternalAddress
* uint32_t real_ip; (IPv4 address, BE)
* uint32_t real_ip; (IPv4 address, BE
, alway 0 in normal client
)
* uint16_t hostname[256]; (UTF-16 string)
* uint16_t hostname[256]; (UTF-16 string)
*/
*/
...
...
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