@COCO @endel thanks for your reply.
Can the client that use colyseus.js 0.13 work properly with the server that use colyseus 0.14. And Is colyseus support backward compatibility ?
In my opinion, the process that upgrade for server can happen easily. But for client, the process depend on rollout update of every store. That mean some users with old version or some user dont accept to update new version can't connect to server that update new version.
Posts made by ttcong194
Hi everyone,
I used colyseus.js 0.13 on cocos creator for mobile and I also used colyseus 0.13 on my server. And both of them run on live. Recently, I have plan to upgrade to new version colyseus for both.
But I dont know what is best way to upgrade for both that dont affect a lot to our system ?
Can anyone give me some ideas,please?
Hi everyone . Is it possible use reconnect in lobby room similar normal room ?
I see lobby room extend from room. But I cant override function
public onLeave?(client: Client, consented?: boolean): void | Promise<any>;
in my own class
export class MainRoom extends LobbyRoom {
}
Thanks for considering me
@endel , thanks for reaching out. I'm looking forward the new proxy. is it public on github ?
Hi everyone,
Recently I used colyseus/proxy for my game. But my proxy sometime go down in interval 1 or 2 day.
is it possible to use nginx instead of colyseus/proxy to scale multiple server or process ?
Thanks all.
Hi everyone,
I use colyseus/proxy for my game. Everything is right and and I deployed all successfully.
But something I get this error ECONNRESET in log of proxy.
This make proxy died and I cant connect to my game.
It happen not usually. Sometime it happen. I dont know what reason is.
It's log from my proxy
2021-03-08T05:22:11: Using proxy 0 /colyseus//api/room?roomId=AxsYHi3Fr
2021-03-08T05:22:11: Using proxy 0 /colyseus//api
2021-03-08T05:22:16: Using proxy 0 /colyseus//api/room?roomId=AxsYHi3Fr
2021-03-08T05:22:16: Proxy error during: /colyseus//api/room?roomId=AxsYHi3Fr
2021-03-08T05:22:16: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
2021-03-08T05:22:16: node VTbmaNTBD/95.111.196.179:8080 failed, unregistering
2021-03-08T05:22:16: Using proxy NaN /colyseus//api/room?roomId=AxsYHi3Fr
2021-03-08T05:22:16: No proxy available! {}
2021-03-08T05:22:16: cleaned up VTbmaNTBD presence
2021-03-08T05:22:16: Using proxy NaN /colyseus//api
2021-03-08T05:22:16: No proxy available! {}
Anyone has same problem ? And how to solve it ?
Thanks all.
@endel . it's done and work for me. thanks for your support. You're so nice.
@endel thanks for replying me.
I update new proxy use this command npm i @colyseus/proxy@latest. And make sure last version is 0.12.4.
But when I check file proxy.js again at /node_modules/@colyseus/proxy/proxy.js, I cant find line req.headers['x-forwarded-for'] = req.connection.remoteAddress;
server.on('upgrade', function (req, socket, head) {
var proxy = getProxy(req.url);
if (proxy) {
proxy.ws(req, socket, head);
}
else {
console.error("No proxy available!", processIds);
}
});
is that any wrong with me ?
I use colyseus/proxy for my game.
If I use this code to get ip. I only get ip of proxy of cloud. Not client's ip.
async onAuth(client: Client, options: any, request: http.IncomingMessage) {
const ip = request.headers['x-forwarded-for'] || request.connection.remoteAddress;
}
Anyone has same problem ? And how to solve this problem ?