Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-router
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
MyCard
ygopro-router
Commits
759eccfe
Commit
759eccfe
authored
Jun 21, 2025
by
nanahira
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
8ef0f9c9
Pipeline
#37914
passed with stages
in 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
main.py
main.py
+4
-2
No files found.
main.py
View file @
759eccfe
...
@@ -65,7 +65,7 @@ def prepare_message(proto: int, data: bytes):
...
@@ -65,7 +65,7 @@ def prepare_message(proto: int, data: bytes):
length
=
len
(
data
)
+
1
# +1 for the packet type byte
length
=
len
(
data
)
+
1
# +1 for the packet type byte
return
struct
.
pack
(
'<H'
,
length
)
+
bytes
([
proto
])
+
data
return
struct
.
pack
(
'<H'
,
length
)
+
bytes
([
proto
])
+
data
CTOS_UPDATE_DECK
=
0x2
CTOS_PLAYER_INFO
=
0x10
CTOS_PLAYER_INFO
=
0x10
CTOS_JOIN_GAME
=
0x12
CTOS_JOIN_GAME
=
0x12
CTOS_EXTERNAL_ADDRESS
=
0x17
CTOS_EXTERNAL_ADDRESS
=
0x17
...
@@ -286,7 +286,9 @@ async def handle_client(reader: StreamReader, writer: StreamWriter):
...
@@ -286,7 +286,9 @@ async def handle_client(reader: StreamReader, writer: StreamWriter):
return
return
dst
.
write
(
header
)
dst
.
write
(
header
)
dst
.
write
(
payload
)
dst
.
write
(
payload
)
await
dst
.
drain
()
if
not
(
direction
==
'CTOS'
and
packet_id
==
CTOS_UPDATE_DECK
):
# no drain after CTOS_UPDATE_DECK, because it's expected to glue with CTOS_READY
await
dst
.
drain
()
except
Exception
as
e
:
except
Exception
as
e
:
logger
.
warning
(
f
"Error in pipe {direction} for {player_descriptor}: {e}"
)
logger
.
warning
(
f
"Error in pipe {direction} for {player_descriptor}: {e}"
)
pass
pass
...
...
nanahira
@nanahira
mentioned in commit
22434ef5
·
Jun 21, 2025
mentioned in commit
22434ef5
mentioned in commit 22434ef585383ab2aa9822d8534aec93c37f0139
Toggle commit list
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