GameServerConfig.ts 1.2 KB

12345678910111213141516171819202122232425262728
  1. /** 游戏服务器配置,给客户端读取使用 */
  2. export class GameServerConfig {
  3. public static isLocalServer: boolean = false;
  4. public LOGIN_SERVER: string = "http://106.55.54.28:7001";
  5. /** 游戏服务器地址 */
  6. // public static GAME_SERVER = 'wss://localcc.xmsgame.com:6000';
  7. public static GAME_SERVER = 'ws://106.55.54.28:7000';
  8. // public static GAME_SERVER = 'ws://192.168.31.231:4000';
  9. // public static GAME_SERVER = 'ws://192.168.31.229:3000';
  10. // public static GAME_SERVER = 'ws://192.168.31.8:3000';
  11. // public static ROOM_SERVER = location.hostname;
  12. /** 两个心跳数据包之间的间隔时间(单位:毫秒) */
  13. static heartbeat_interval: number = 1000;
  14. /** 如果在此期间心跳数据包没有得到回复,连接将被关闭(单位:毫秒) */
  15. static heartbeat_timeout: number = 3000;
  16. /** 客户端发送玩家状态信息的频率 */
  17. static player_state_update_rate: number = 0.066;
  18. /** 客户端同步版本号 */
  19. public static syncVersion: number = 1;
  20. /** 客户端版本号 */
  21. public static appVersion: number = 220;
  22. /** 重连上限 */
  23. public static reconnectMax: number = 3;
  24. }