Skip to content

actix-ws: Session should implement Sink #563

@ricoriedel

Description

@ricoriedel

Hello everyone!

I am currently working on a project with websockets and ran into a small issue. I wanted to test the part of my application that sends the websocket messages using actix_ws::Session. Instead of starting a fake sever and using a real websocket client, I wanted to test the message exchange by replacing Session with a channel.

Although actix_ws::MessageStream implements Stream, actix_ws::Session does not implement Sink. Changing this would make testing much easier.

Thank you for your hard work maintaining this awesome project!

Edit: My apologies, the Sender inside Session does not implement Sink. This makes it more difficult to implement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-wsProject: actix-wsC-improvementCategory: an improvement to existing functionalitygood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions