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

Sockets fixed #462

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Sockets fixed #462

wants to merge 15 commits into from

Conversation

jvilk
Copy link
Member

@jvilk jvilk commented Jun 6, 2016

These commits refactor and fix our implementation of TCP sockets. It also adds a server and client for testing purposes, so we can make sure that the sockets do not get broken again!

TODO before merge:

  • Test Websocket flash fallback, make sure it works.
  • Test in more browsers.
  • Test that we throw appropriate errors

John Vilk added 3 commits June 2, 2016 11:11
Sockets are abstracted in `socket.ts`, and I have implemented them for Node and Websockify. This cleans up our native methods.

The TCPTest works in Node but fails in the browser. The Websockify JavaScript library needs some loving. It assumes that it is running in the main browser context and spews global variables all over the place. I've made some adjustments, but it seems like it may be worth reimplementing in TypeScript in a more modular fashion. I have it working in the Worker context for the unit tests, but it fails to properly do the Websockify handshake.
Not strenuously tested yet, but work with a simple "HELLO WORLD".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant