我正在尝试设置gamelift,为了测试集成,我在本地启动了gamelift,它实例化了亚马逊游戏服务这里是日志
17:50:53,460 INFO || - [SocketIOServer] main - Session store / pubsub
factory used: MemoryStoreFactory (local session store only)
17:50:54,460 WARN || - [ServerBootstrap] main - Unknown channel option
'SO_LINGER' for channel '[id: 0xc9982980]'
17:50:54,467 INFO || - [SocketIOServer] nioEventLoopGroup-2-1 - SocketIO
server started at port: 5757
17:50:54,467 INFO || - [SDKConnection] main - GameLift SDK server
(communicates with your game server) has started on http://localhost:5757
17:50:54,501 INFO || - [StandAloneServer] main - GameLift Client server
(listens for GameLift client APIs) has started on http://localhost:9080
现在我不知道如何在端口 5757 与我的实时脚本建立连接。
我试过使用
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
var request = new XMLHttpRequest();
request.open('GET', 'http://localhost:5757', true)
request.onload = function () {
Init();
console.log("server initialised")
}
它甚至不会 ping 本地的 gamelift。
请帮助如何建立连接。