Why do you want to do that? You're already talking about a request/response flow, which only makes sense if you first establish a connection with the server and then wait for a response.
If you don't want to keep the ENetPeer around on the server, then close it gracefully with enet_peer_disconnect() after you've sent the response. / Soren > -----Original Message----- > From: [email protected] [mailto:enet-discuss- > [email protected]] On Behalf Of Emmanuel Rivoire > Sent: Thursday, May 24, 2012 7:08 AM > To: [email protected] > Subject: [ENet-discuss] Questioning a server without connecting to it > > Hello, > > 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 > client address > - 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. > > _______________________________________________ > ENet-discuss mailing list > [email protected] > http://lists.cubik.org/mailman/listinfo/enet-discuss _______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
