Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

WebSocketEvents.on_connection() should not automatically accept the WS connection with 101 #32

Open
ibc opened this issue Dec 19, 2012 · 0 comments

Comments

@ibc
Copy link
Member

ibc commented Dec 19, 2012

Currently once the WebSocketEvents.on_connection() is executed OverSIP automatically accepts the WS connection (by calling OverSIP::WebSocket#accept_ws_handshake()) unless the user has called to connection.http_reject().

This avoids the user writting a WebSocketEvents.on_connection() code in which OverSIP generates a SIP request (Uac module) and waits for the SIP response before it accepts or rejects the WS connection. So for a new design:

  • The default WebSocketEvents.on_connection() in default_server.rb must call to #accept_ws_handshake().
  • If the user redefines it, he should explicitly call to #accept_ws_handshake() or http_reject() in the event code. Otherwise the WS won't be replied.
@ghost ghost assigned ibc Dec 19, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant