Skip to content
Snippets Groups Projects

Add support for https and wss when using domain names

Closed Simon Lefort requested to merge slefort/webapp-lib:cpc/androz2091-wss-support into cpc/cleanup
  1. Nov 28, 2024
  2. Nov 27, 2024
    • Clément Pit-Claudel's avatar
      44c0e627
    • Clément Pit-Claudel's avatar
    • Clément Pit-Claudel's avatar
      Run the HTTP and WebSocket servers on the same port · 62fb2505
      Clément Pit-Claudel authored
      Use Cask's built-in websocket implementation instead of a separate
      `java_websocket` server.
      
      * jvm/src/main/scala/cs214/webapp/server/web/WebServer.scala:
        Remove the `WS_PORT` parameter.
      * jvm/src/main/scala/cs214/webapp/server/web/WebServerRoutes.scala:
        (getAppInfo): Use `HTTP_PORT` instead of `WS_PORT` in `wsEndpoint`
        (websocket): New endpoint.
      * jvm/src/main/scala/cs214/webapp/server/web/WebSocketsCollection.scala:
        Remove `java_websocket` imports.
        Change from `WebSocket` to `cask.WsChannelActor`.
        Rename `appId` to `instanceId` where appropriate.
        (WebSocketsCollection): Remove the `port` parameter.
        (connect): New function, replacing the previous `WebSocketServer` instance.
      * shared/src/main/scala/cs214/webapp/Common.scala:
        (WS_PORT): Remove.
        (WebSocket): New endpoint.
      62fb2505
Loading