如何为 Python Rust+ API Wrapper 建立 Websocket 连接
How do make a Websocket connection for a Python Rust+ API Wrapper
好的,所以我想访问 Rust+ API 游戏 Rust。目前没有 API 包装器写在 python 中,只有 JavaScript 但是我不知道如何写 javascript.
这是模块:
https://github.com/liamcottle/rustplus.js
我看过它,但我没有任何线索,据我所知,他们在打开插座时没有做任何不同的事情?那可能是我太蠢了!
我想知道是否有人可以提供任何见解?
我用随机服务器试过这段代码:
import asyncio
import websockets
async def main():
async with websockets.connect("ws://onegrid.projectnova.gg:25584") as websocket:
returnData = await websocket.recv()
print(returnData)
asyncio.get_event_loop().run_until_complete(main())
但是它出错了:
Exception has occurred: ConnectionRefusedError
[WinError 1225] The remote computer refused the network connection
不知有没有人能帮忙,或指点一下!
python
现在有一个
好的,所以我想访问 Rust+ API 游戏 Rust。目前没有 API 包装器写在 python 中,只有 JavaScript 但是我不知道如何写 javascript.
这是模块: https://github.com/liamcottle/rustplus.js
我看过它,但我没有任何线索,据我所知,他们在打开插座时没有做任何不同的事情?那可能是我太蠢了!
我想知道是否有人可以提供任何见解?
我用随机服务器试过这段代码:
import asyncio
import websockets
async def main():
async with websockets.connect("ws://onegrid.projectnova.gg:25584") as websocket:
returnData = await websocket.recv()
print(returnData)
asyncio.get_event_loop().run_until_complete(main())
但是它出错了:
Exception has occurred: ConnectionRefusedError
[WinError 1225] The remote computer refused the network connection
不知有没有人能帮忙,或指点一下!
python
现在有一个