Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

add a message or callback to handle the websocket connection after handshake #674

Closed
benoitc opened this Issue Feb 24, 2014 · 4 comments

Comments

Projects
None yet
2 participants

benoitc commented Feb 24, 2014

It would be interesting to have a message or a callback to execute some code when the websocket connection is made (so after the handshake.

Owner

essen commented Feb 24, 2014

You can easily send yourself a message.

benoitc commented Feb 24, 2014

Do you mean an action on the client? Or sending an erlang message to the current pid and handle it in websocket_info?

I have 2 uses-cases here:

  • proxy a websocket
  • log the handshake.

In these cases I have no control on the client.

Owner

essen commented Feb 24, 2014

An Erlang message to the current pid. If you send it in websocket_init it is guaranteed to arrive before any websocket frame from the client.

benoitc commented Feb 24, 2014

cool. Thanks for the info.

@benoitc benoitc closed this Feb 24, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment