-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Now that the client is somewhat structured, we can start to think about how messages coming from Steam should propagate through the client, in a way the end-user can interact with them.
While searching for references, two libraries reactive libraries come to mind:
Teloxide code is rather intricate, and I not sure I follow it completely.
Serenity is ok.
The event dispatcher:
The user could register "channels" that he is interested, such as SteamFriends(friends messages, friends persona status changes), or SteamUser(logOn, logOff).
This is what SteamKit2 does, and what message goes to which channel is kind arbitrary.
Then, the user can send outgoing messages, or answer to incoming ones based on his callbacks.
The basic flow would be the following, excluding the initial communication and heartbeat:
inc. socket message -> to packet message -> check if handler exists || -> no -> discarded
\
-> yes -> user callback -> message written on socket
We are open to new ideas!