Skip to content

Conversation

daurnimator
Copy link
Owner

  • framing functions
  • client side
  • server side
  • documentation
  • example
  • tests

@RyanSquared
Copy link
Contributor

22:49:40    <~daurnimator>  though I'm considering renaming send => write
22:49:47    <~AlissaSquared>    Yes, that's what I was about to ask about
22:49:57    <~AlissaSquared>    send/receive and read/write are typically what's used.

@daurnimator
Copy link
Owner Author

I just renamed :read to :receive. See the commit message for more rationale.

@daurnimator daurnimator force-pushed the websockets branch 2 times, most recently from d0acc22 to 410d65a Compare March 15, 2016 02:51
@coveralls
Copy link

Coverage Status

Coverage increased (+0.004%) to 84.757% when pulling ad43394 on websockets into d59a831 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-4.6%) to 80.168% when pulling 6309bee on websockets into d59a831 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 82.23% when pulling 61bf718 on websockets into d59a831 on master.

  - Imported code from prosody
  - Started refactoring

Has WIP negotiation code at bottom of module
Refactor into a websocket "object"
Matches better with 'send'.

Didn't want to change to read/write as those should have the same signature as lua file handles (and hence not take timeouts)
No longer check protocols case-insensitively
Copy the passed protocols array so that the caller can safely modify afterwards
It won't conflict with `err, errno` idiom, as codes are always >1000
bit.bor in certain setups doesn't take >2 arguments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.6%) to 84.143% when pulling 4f0515f on websockets into 101f0b7 on master.

@daurnimator
Copy link
Owner Author

API question: How should error codes be returned to the caller.
e.g. you call :receive; the peer causes a in-frame protocol error: you have multiple error codes to pick between:

  1. the code you send to the peer informing them of their error
  2. the code you receive in their acknowledgement of the error
  3. a generated errno

2. is currently stored in ws.got_close_code, so I've tentatively picked option 1.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 84.814% when pulling 81d21c4 on websockets into 101f0b7 on master.

@daurnimator daurnimator removed the WIP label Mar 25, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 84.833% when pulling f456f75 on websockets into 101f0b7 on master.

@daurnimator daurnimator merged commit f456f75 into master Mar 25, 2016
@daurnimator daurnimator deleted the websockets branch March 26, 2016 00:36
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.

3 participants