bytedance / monoio

Rust async runtime based on io-uring.
Apache License 2.0
4.03k stars 226 forks source link

A new trait for Socket #291

Closed Lzzzzzt closed 2 months ago

Lzzzzzt commented 3 months ago

Is your feature request related to a problem? Please describe. I am trying to implement AsyncWriteRent for File, but the signature shutdown defined in this trait is used to shutdown a socket connection, which is needless for File.

Describe the solution you'd like IMO, there could be something like SocketShutdown.

Describe alternatives you've considered It can also do nothing in the implement of File and using docs to tell user about why, but a little bit wired.

Lzzzzzt commented 3 months ago

@Xuanwo @ihciah any idea?

ihciah commented 3 months ago

I think it can be aligned with tokio. In tokio's file impl it impl poll_shutdown as poll_flush.