kcp icon indicating copy to clipboard operation
kcp copied to clipboard

Async write for Kcp Struct

Open stevefan1999-personal opened this issue 2 years ago • 1 comments

Currently Kcp struct requires Write which makes integration with DTLS a little hard (since send_to is async rather than sync) so what can we do to deal with this situation?

stevefan1999-personal avatar May 01 '22 20:05 stevefan1999-personal

https://github.com/zonyitoo/tokio-tfo https://github.com/Matrix-Zhang/tokio_kcp

zonyitoo avatar May 03 '22 23:05 zonyitoo

https://github.com/Matrix-Zhang/kcp/blob/58e863fcbdf4cdd0df9e9c378a864dd4d0c8f58f/src/kcp.rs#L155-L185

KcpOutput now supports AsyncWrite with feature = "tokio" enabled.

zonyitoo avatar Feb 20 '24 02:02 zonyitoo