Closed Lemonzyy closed 1 year ago
Thank you for the kind words, and your ideas.
I do think it would be nice too. As for the uses cases, I'm sure it could additionally be useful for tools and bots. I will look into it.
I just thought of a problem that will not only occur for this feature. Currently, a client (or server) is directly initialized at application startup, but this is not always desired. Often the client needs to be able to connect to a server later in the application (e.g. choose server to connect to in server list menu).
This last issue is already solved in main
, and will be released with 0.2.0. Both client and server respectively have a connect
and start
method,
You can see it in the examples on main
: chat client, chat server
This might still evolve if the multiple-clients-connections makes it for 0.2.0
Oh yes sorry I haven't looked in main
. This is indeed what I was describing above.
Implemented by #3
First of all I must say that this crate is very good and I hope it will continue to improve.
Suggested feature
I think it would be nice that a "client application" could manage several connections at the same time.
Use cases
One of the use cases would be to make a server list menu where the client would send requests to each server to know their status, ping, number of connected players, etc. (a la Minecraft)
Implementation ideas
Client
resource capable of handling multiple connectionsClient
resource a component to have multiple clients in one application