I am doing a distributed system project about DCCP protocol. So the aim is for each node to be able to communicate with all other nodes through DCCP protocol. I know I can use a data structure to maintain all sockets that are established. But I want a more asynchronous solution so that only one thread is needed to handle all message events from all sockets. It seems that tokio and mio crate only implement asynchronous TCP and UDP datatypes. I wonder if there is a way to make it work for DCCP as well. Thanks in advance!
Asked
Active
Viewed 76 times
0
-
You might be able to use mio EventedFd to build a custom Stream type if you write all the code to handle actually interacting with the socket and use mio for the calls to epoll: https://docs.rs/mio/0.6.19/mio/unix/struct.EventedFd.html – user1937198 Nov 10 '19 at 22:39
-
@user1937198 That's exactly what I am looking for. Thanks! – Kou Chibin Nov 11 '19 at 10:05