atmosphere-play
atmosphere-play copied to clipboard
Example on front page does not work.
Play Framework 2.5.4, atmosphere-play 2.3.0
Used the chat code from the front page of this project, get handshake errors when trying to connect websocket. WebSocket connection to 'ws://localhost:9000/chat?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.2-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&Content-Type=application/json&X-atmo-protocol=true' failed: Error during WebSocket handshake: Unexpected response code: 404
Can someone please explain what the replacement is for the missing Router.dispatch() method????
I have the same problem! Edit : solved with issue #39
Issue #39 did not solve the problem for me and the example on git seems to be broken as well.
It uses Router.request, which cannot be found in the current version and there is no explanation of what to do differently. I've tried using the following line in application.conf, as suggested in issue #39:
play.https.requestHandler = "org.atmosphere.play.AtmosphereHttpRequestHandler"
It does not work and it seems the onRouteRequest cannot easily be replaced in Java:
GlobalSettings.onRouteRequest: There is no simple migration for this method when using the Java API. If you need this, you will have to keep your Global class around for a little longer.
(from the Play documentation: https://www.playframework.com/documentation/2.5.x/GlobalSettings).