[ENet-discuss] Questioning a server without connecting to it
manu.n02 at laposte.net
Thu May 24 05:07:36 PDT 2012
would it be possible to add the possibility to question a server
without connecting to it ?
I'd like to ping several servers to know if they are accessible and
with what latency, to display in a server list.
I'd need custom info sent with the answer ( = variable buffer size).
I'd fill this buffer with information about the current state of the server.
It might need a request ID, so the server can know the client is able
to request the info (ie: the server and client run the same
application / game).
API would be something like this for the client :
- a function to send info request message with ID to specified address
- get back a Info Reply event when it comes (if it comes) when
calling enet_host_service() with event.packet containing the custom
info , and the server address (that should be added to event, I guess)
and for server :
- an Info Request event with event.packet containing ID , and the
- send info reply with custom Buffer to specified address
That would be quite useful for games (maybe not much for applications, though).
And if not possible, I'll try to do by myself... Hopefully, it won't
be too hard.
More information about the ENet-discuss