Skip to content

WebSocket: allow UpgradeToWebSocket to support flows of FrameEvents #944

@pjfanning

Description

@pjfanning

We removed the deprecated WebSocketUpgrade class in 2.0.0-M1.

Play needs access to work at a low level and just the Message level that WebSocketUpgrade supports. (playframework/playframework#13744)

private[http] def handleFrames(handlerFlow: Graph[FlowShape[FrameEvent, FrameEvent], Any],

As you can see in UpgradeToWebSocketLowLevel, it should be easy enough expose FrameEvent support.

I prefer this to adding back the WebSocketUpgrade code and supporting both approaches again.

If we do change UpgradeToWebSocket support maybe we can hide the frame event support and have users cast their UpgradeToWebSocket instance to UpgradeToWebSocketLowLevel to access the additional handleFrames method.

Edit
Play already has a hack to access UpgradeToWebSocketLowLevel so we may get away with not changing anything in Pekko. They have a org.apache.pekko.http class in Play to skip around the package private setting on UpgradeToWebSocketLowLevel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions