Commit 118f787d authored by Chunchi Che's avatar Chunchi Che

update small

parent cdce7caf
......@@ -29,17 +29,17 @@ export default function JoinRoom() {
<p>
<input
type="text"
title="passwd"
value={passWd}
onChange={handlePasswdChange}
title="ip"
value={ip}
onChange={handleIpChange}
></input>
</p>
<p>
<input
type="text"
title="ip"
value={ip}
onChange={handleIpChange}
title="passwd"
value={passWd}
onChange={handlePasswdChange}
></input>
</p>
<button>
......
......@@ -29,6 +29,8 @@ export default function WaitRoom() {
) {
const wsCurrent = ws.current;
wsCurrent.binaryType = "arraybuffer";
const playerInfo = new ygopro.YgoCtosMsg({
ctos_player_info: new ygopro.CtosPlayerInfo({
name: player
......@@ -54,7 +56,8 @@ export default function WaitRoom() {
};
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;
......@@ -69,8 +72,8 @@ export default function WaitRoom() {
return (
<div>
<p>player: {params.player}</p>
<p>passwd: {params.passWd}</p>
<p>ip: {params.ip}</p>
<p>passwd: {params.passWd}</p>
</div>
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment