Share players position using Socket.IO
- I stocked information user (id, room and position) in socket client. - I created function to send all information every few 10 milliseconds. Note : when the front will be available, we must check the performance of back server.
This commit is contained in:
parent
f04d1342b5
commit
fbcb48f9ad
4 changed files with 71 additions and 8 deletions
|
@ -2,6 +2,8 @@ import {Socket} from "socket.io";
|
|||
import {PointInterface} from "./PointInterface";
|
||||
|
||||
export interface ExSocketInterface extends Socket {
|
||||
token: object;
|
||||
token: any;
|
||||
roomId: string;
|
||||
userId: string;
|
||||
position: PointInterface;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue