Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
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
love_飞影
Neos
Commits
118f787d
Commit
118f787d
authored
Oct 04, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update small
parent
cdce7caf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
src/JoinRoom.tsx
src/JoinRoom.tsx
+6
-6
src/WaitRoom.tsx
src/WaitRoom.tsx
+5
-2
No files found.
src/JoinRoom.tsx
View file @
118f787d
...
@@ -29,17 +29,17 @@ export default function JoinRoom() {
...
@@ -29,17 +29,17 @@ export default function JoinRoom() {
<
p
>
<
p
>
<
input
<
input
type=
"text"
type=
"text"
title=
"
passwd
"
title=
"
ip
"
value=
{
passWd
}
value=
{
ip
}
onChange=
{
handle
Passwd
Change
}
onChange=
{
handle
Ip
Change
}
></
input
>
></
input
>
</
p
>
</
p
>
<
p
>
<
p
>
<
input
<
input
type=
"text"
type=
"text"
title=
"
ip
"
title=
"
passwd
"
value=
{
ip
}
value=
{
passWd
}
onChange=
{
handle
Ip
Change
}
onChange=
{
handle
Passwd
Change
}
></
input
>
></
input
>
</
p
>
</
p
>
<
button
>
<
button
>
...
...
src/WaitRoom.tsx
View file @
118f787d
...
@@ -29,6 +29,8 @@ export default function WaitRoom() {
...
@@ -29,6 +29,8 @@ export default function WaitRoom() {
)
{
)
{
const
wsCurrent
=
ws
.
current
;
const
wsCurrent
=
ws
.
current
;
wsCurrent
.
binaryType
=
"
arraybuffer
"
;
const
playerInfo
=
new
ygopro
.
YgoCtosMsg
({
const
playerInfo
=
new
ygopro
.
YgoCtosMsg
({
ctos_player_info
:
new
ygopro
.
CtosPlayerInfo
({
ctos_player_info
:
new
ygopro
.
CtosPlayerInfo
({
name
:
player
name
:
player
...
@@ -54,7 +56,8 @@ export default function WaitRoom() {
...
@@ -54,7 +56,8 @@ export default function WaitRoom() {
};
};
ws
.
current
.
onmessage
=
e
=>
{
ws
.
current
.
onmessage
=
e
=>
{
console
.
log
(
"
websocket read message:
"
+
e
.
data
);
const
pb
:
ygopro
.
YgoStocMsg
=
ygopro
.
YgoStocMsg
.
deserializeBinary
(
e
.
data
);
console
.
log
(
"
websocket read message:
"
+
pb
);
};
};
const
wsCurrent
=
ws
.
current
;
const
wsCurrent
=
ws
.
current
;
...
@@ -69,8 +72,8 @@ export default function WaitRoom() {
...
@@ -69,8 +72,8 @@ export default function WaitRoom() {
return
(
return
(
<
div
>
<
div
>
<
p
>
player:
{
params
.
player
}
</
p
>
<
p
>
player:
{
params
.
player
}
</
p
>
<
p
>
passwd:
{
params
.
passWd
}
</
p
>
<
p
>
ip:
{
params
.
ip
}
</
p
>
<
p
>
ip:
{
params
.
ip
}
</
p
>
<
p
>
passwd:
{
params
.
passWd
}
</
p
>
</
div
>
</
div
>
);
);
}
}
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