Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
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
srvpro
Commits
b1269665
Commit
b1269665
authored
Jul 24, 2019
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse buffers each time
parent
c8f29f66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
4 deletions
+36
-4
ygopro-server.coffee
ygopro-server.coffee
+16
-2
ygopro-server.js
ygopro-server.js
+20
-2
No files found.
ygopro-server.coffee
View file @
b1269665
...
...
@@ -1617,7 +1617,8 @@ net.createServer (client) ->
cancel
=
true
b
=
ctos_buffer
.
slice
(
3
,
ctos_message_length
-
1
+
3
)
info
=
null
if
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
CTOS
[
ygopro
.
constants
.
CTOS
[
ctos_proto
]]]
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
CTOS
[
ygopro
.
constants
.
CTOS
[
ctos_proto
]]]
if
struct
and
!
cancel
struct
.
_setBuff
(
b
)
info
=
_
.
clone
(
struct
.
fields
)
if
ygopro
.
ctos_follows_before
[
ctos_proto
]
and
!
cancel
...
...
@@ -1625,10 +1626,16 @@ net.createServer (client) ->
result
=
ctos_event
.
callback
b
,
info
,
client
,
client
.
server
,
datas
if
result
and
ctos_event
.
synchronous
cancel
=
true
if
struct
and
!
cancel
struct
.
_setBuff
(
b
)
info
=
_
.
clone
(
struct
.
fields
)
if
ygopro
.
ctos_follows
[
ctos_proto
]
and
!
cancel
result
=
ygopro
.
ctos_follows
[
ctos_proto
].
callback
b
,
info
,
client
,
client
.
server
,
datas
if
result
and
ygopro
.
ctos_follows
[
ctos_proto
].
synchronous
cancel
=
true
if
struct
and
!
cancel
struct
.
_setBuff
(
b
)
info
=
_
.
clone
(
struct
.
fields
)
if
ygopro
.
ctos_follows_after
[
ctos_proto
]
and
!
cancel
for
ctos_event
in
ygopro
.
ctos_follows_after
[
ctos_proto
]
result
=
ctos_event
.
callback
b
,
info
,
client
,
client
.
server
,
datas
...
...
@@ -1694,7 +1701,8 @@ net.createServer (client) ->
cancel
=
false
b
=
stoc_buffer
.
slice
(
3
,
stoc_message_length
-
1
+
3
)
info
=
null
if
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
STOC
[
ygopro
.
constants
.
STOC
[
stoc_proto
]]]
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
STOC
[
ygopro
.
constants
.
STOC
[
stoc_proto
]]]
if
struct
and
!
cancel
struct
.
_setBuff
(
b
)
info
=
_
.
clone
(
struct
.
fields
)
if
ygopro
.
stoc_follows_before
[
stoc_proto
]
and
!
cancel
...
...
@@ -1702,10 +1710,16 @@ net.createServer (client) ->
result
=
stoc_event
.
callback
b
,
info
,
server
.
client
,
server
,
datas
if
result
and
stoc_event
.
synchronous
cancel
=
true
if
struct
and
!
cancel
struct
.
_setBuff
(
b
)
info
=
_
.
clone
(
struct
.
fields
)
if
ygopro
.
stoc_follows
[
stoc_proto
]
and
!
cancel
result
=
ygopro
.
stoc_follows
[
stoc_proto
].
callback
b
,
info
,
server
.
client
,
server
,
datas
if
result
and
ygopro
.
stoc_follows
[
stoc_proto
].
synchronous
cancel
=
true
if
struct
and
!
cancel
struct
.
_setBuff
(
b
)
info
=
_
.
clone
(
struct
.
fields
)
if
ygopro
.
stoc_follows_after
[
stoc_proto
]
and
!
cancel
for
stoc_event
in
ygopro
.
stoc_follows_after
[
stoc_proto
]
result
=
stoc_event
.
callback
b
,
info
,
server
.
client
,
server
,
datas
...
...
ygopro-server.js
View file @
b1269665
...
...
@@ -2073,7 +2073,8 @@
}
b
=
ctos_buffer
.
slice
(
3
,
ctos_message_length
-
1
+
3
);
info
=
null
;
if
(
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
CTOS
[
ygopro
.
constants
.
CTOS
[
ctos_proto
]]])
{
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
CTOS
[
ygopro
.
constants
.
CTOS
[
ctos_proto
]]];
if
(
struct
&&
!
cancel
)
{
struct
.
_setBuff
(
b
);
info
=
_
.
clone
(
struct
.
fields
);
}
...
...
@@ -2087,12 +2088,20 @@
}
}
}
if
(
struct
&&
!
cancel
)
{
struct
.
_setBuff
(
b
);
info
=
_
.
clone
(
struct
.
fields
);
}
if
(
ygopro
.
ctos_follows
[
ctos_proto
]
&&
!
cancel
)
{
result
=
ygopro
.
ctos_follows
[
ctos_proto
].
callback
(
b
,
info
,
client
,
client
.
server
,
datas
);
if
(
result
&&
ygopro
.
ctos_follows
[
ctos_proto
].
synchronous
)
{
cancel
=
true
;
}
}
if
(
struct
&&
!
cancel
)
{
struct
.
_setBuff
(
b
);
info
=
_
.
clone
(
struct
.
fields
);
}
if
(
ygopro
.
ctos_follows_after
[
ctos_proto
]
&&
!
cancel
)
{
ref3
=
ygopro
.
ctos_follows_after
[
ctos_proto
];
for
(
n
=
0
,
len3
=
ref3
.
length
;
n
<
len3
;
n
++
)
{
...
...
@@ -2173,7 +2182,8 @@
cancel
=
false
;
b
=
stoc_buffer
.
slice
(
3
,
stoc_message_length
-
1
+
3
);
info
=
null
;
if
(
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
STOC
[
ygopro
.
constants
.
STOC
[
stoc_proto
]]])
{
struct
=
ygopro
.
structs
[
ygopro
.
proto_structs
.
STOC
[
ygopro
.
constants
.
STOC
[
stoc_proto
]]];
if
(
struct
&&
!
cancel
)
{
struct
.
_setBuff
(
b
);
info
=
_
.
clone
(
struct
.
fields
);
}
...
...
@@ -2187,12 +2197,20 @@
}
}
}
if
(
struct
&&
!
cancel
)
{
struct
.
_setBuff
(
b
);
info
=
_
.
clone
(
struct
.
fields
);
}
if
(
ygopro
.
stoc_follows
[
stoc_proto
]
&&
!
cancel
)
{
result
=
ygopro
.
stoc_follows
[
stoc_proto
].
callback
(
b
,
info
,
server
.
client
,
server
,
datas
);
if
(
result
&&
ygopro
.
stoc_follows
[
stoc_proto
].
synchronous
)
{
cancel
=
true
;
}
}
if
(
struct
&&
!
cancel
)
{
struct
.
_setBuff
(
b
);
info
=
_
.
clone
(
struct
.
fields
);
}
if
(
ygopro
.
stoc_follows_after
[
stoc_proto
]
&&
!
cancel
)
{
ref3
=
ygopro
.
stoc_follows_after
[
stoc_proto
];
for
(
n
=
0
,
len3
=
ref3
.
length
;
n
<
len3
;
n
++
)
{
...
...
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