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

To discuss #17

Open
inou opened this issue Dec 23, 2014 · 1 comment
Open

To discuss #17

inou opened this issue Dec 23, 2014 · 1 comment
Milestone

Comments

@inou
Copy link

inou commented Dec 23, 2014

After reading RFC 6455 and reviewing the code I think that we can make it better in couple ways:

Naming

RFC mentions 4 states of connection

  • CLOSED, CONNECTING, OPEN, CLOSING

Current implementation has

  • disconnected, handshaking, connected

I think we can move to RFC convention, which makes sense: one, from architectural pov; two, it would follow official specification.

Reshape the code base (little bit ;) )

Couple of loose thoughts here:

  1. I'd like to extract codec into separate module
  2. Build in (maybe) reconnecting after receiving HTTP redirect code (3xx)
  3. Maybe separate connection logic from the rest (I'm not sure if it's actually needed atm)

Add tests

A lot. WIth nicely divided code base that should show lots of bugs, unusual behaviours etc. Adding Proper here would be nice to cover all that.

Thoughts on that?

ps.: + extensions

@sanmiguel
Copy link
Owner

Completely agree on all counts!

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

2 participants