Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of custom close codes and access to close message payload #229

Closed
serieuxchat opened this issue Aug 9, 2016 · 5 comments
Closed

Comments

@serieuxchat
Copy link

serieuxchat commented Aug 9, 2016

I was wondering whether it would be possible to support the following:

  • Ability to specify a custom code when closing the web socket (currently the disconnect method always sends CloseCode.Normal.rawValue)
  • Ability to get the payload of the close message that is sent by the remote end.
    (Currently the private method processTCPHandshake only passes the received HTTP code to doDisconnect and the eventual callback, but there is no way to get the payload that came with the close message).

(The RFC refers to the possible custom body of the Close message in https://tools.ietf.org/html/rfc6455#section-5.5.1)

@daltoniam
Copy link
Owner

@serieuxchat
Copy link
Author

(1) Would be really great if it's supported.
(2) Wow, that awesome! I guess, the reason string (UTF8 encoded data from section 5.5.1) would be enough for our purposes. I will give it a try asap.

@daltoniam
Copy link
Owner

This was added in the 2.0.0 release (Swift 3 support)!

@serieuxchat
Copy link
Author

I was wondering whether it would be possible to have those in Swift 2.3 code as well?

@commjoen
Copy link

commjoen commented Oct 3, 2016

+1 for the swift 2.3 code as we are using this in our project :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants