Skip to content

Discussion: should we await send call message in serve loop? #170

@4t145

Description

@4t145

In the serve loop of serve_inner, we await each SinkExt::send call. Should we make them asynchronous? It should, this may lead a lot of changes, for we have to change the defination of InfoTransport, which allow transport to create a send future and executed asynchronously by tokio.

As far as I can see by now, the Stream trait is proper for receiving messages from peer, but Sink seems not suitable for sending messages to peer. Because it doesn't focus on the sending result of single messages. It could be a mistake I made.

@jokemanfire How do you think about this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-enhancementNew features and enhancementsquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions