Closed tinaun closed 4 years ago
FYI - I've been working on an async implementation of the Connection
side of things, so it might be good to combine efforts. Currently I have it connecting, need to verify it stays connected over reconnections and need to add back in all the hooks for voice support and etc
I've posted my WIP over at https://github.com/SpaceManiac/discord-rs/pull/148
Should I close my pull request so we'll continue here?
They're somewhat independent so far in that changing out the http library for the request-response bits won't impact the async side too much. Doing the dependency update as a separate PR would therefore be worthwhile I think.
im getting somewhere with this
Awesome! When do you plan on rebasing on top of the latest master? Leave it until you're done?
yeah. im working on voice stuff now. its tricky! i may end up rewriting a lot more than just the network stuff.
current todo list:
parameterize gateways over the type of event they stream (VoiceEvent
vs GatewayEvent
)
split the sync wrapper handle into the core event loop and a handle to a future, to allow concurrent gateway connections (voicegateway + gateway + voicedata at once)
write a stream + sink impl around tokios UdpSocket
for the actual voice channel connections
work out error handling - how should errors in channel sending be handled?
handle reconnects in the sync Connection
type
I adore your enthusiasm for the project :)
how should errors in channel sending be handled?
You mean like Sender.send
? That should probably just be unwrapped in the most cases, since it can only fail if the receiver is dropped, which it shouldn't be before the sender is.
Closing due to long-term WIP status and severe merge conflicts.
continued from #143