Commit Graph

3 Commits

Author SHA1 Message Date
Joel Martin 5f03c3d093 tcp-client.js: after read, try read again.
After a read completes it's possible more data is pending so issue an
immediate read again to pick this up quickly.
2012-09-17 17:15:50 -05:00
Joel Martin 8ec3cfaacd tcp-client.js: read/write arraybuffer. Read/disconnect handling.
- enable sending and receiving of raw array buffers in addition to
  strings.

- add a read poll interval and set it to 15ms by default to detect
  and handle quickly when a message is pending.

- also, detect a disconnected state and add call registration for
  disconnect events.
2012-09-17 17:15:48 -05:00
Joel Martin 07392d4fb8 include/chrome-app/tcp-client.js: import upstream.
Import upstream code from Chrome extension telnet demo:
https://raw.github.com/GoogleChrome/chrome-app-samples/0ce28768087863c08aa04a2b9b27bd50796a77ec/telnet/tcp-client.js
2012-09-17 17:15:47 -05:00