We use the Colyseus (0.14) client for Unity and have run into an issue: Player A seems to fail to send messages to the server so that other players cannot see him move. But interestingly, he still can see other players move around. This persists for about 1 minute before onLeave() is triggered on him.
Is there a case that client fails to send messages to server but still receives patches from server for a while?
Yes, there's a ping function inside Colyseus:
v0.15:
import { Server } from "colyseus";
import { WebSocketTransport } from "@colyseus/ws-transport";
const gameServer = new Server({
transport: new WebSocketTransport({
server: http.createServer(app),
pingInterval: 5000,
pingMaxRetries: 3,
})
});
before v0.15:
import { Server } from "colyseus";
const gameServer = new Server({
server: http.createServer(app),
pingInterval: 5000,
pingMaxRetries: 3,
})