AmandaDiscord / Volcano

A light-weight LavaLink compatible replacement
MIT License
71 stars 15 forks source link

Feature request: Respond to opcode ping #21

Closed aarhuuus closed 2 years ago

aarhuuus commented 2 years ago

Respond to Websocket payload { op: ping } for wrappers with the functionality to get the ping of the Node.

I don't know how to explain by depth, basically the wrapper makes a variable named t1 and saves a timestamp before making a ping payload, after receiving the pong payload it gets the timestamp after receiving a pong thus calculating the ping of how long the ping payload took in milliseconds.

Source: https://github.com/davidffa/lavalink/blob/dev/src/main/kotlin/lavalink/server/io/WebSocketHandlers.kt#L161 Function the library acknowledges: https://github.com/davidffa/Vulkava/blob/main/lib/Node.ts#L227

PapiOphidian commented 2 years ago

Is this an upstream LavaLink feature?

aarhuuus commented 2 years ago

Is this an upstream LavaLink feature?

a feature based off a lavalink fork, basically relying on the node to see if the node is responsive or not

PapiOphidian commented 2 years ago

Sure, I can add support, but I don't really want to diverge from LavaLink too much

PapiOphidian commented 2 years ago

This will be released in Volcano 1.1.6