Skip to content

Commit

Permalink
move to streams2 interface
Browse files Browse the repository at this point in the history
add basic test harness
expose close frame code and reason
  • Loading branch information
jclulow committed Jun 8, 2013
1 parent 34e2d07 commit 36cf93b
Show file tree
Hide file tree
Showing 5 changed files with 197 additions and 74 deletions.
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -92,9 +92,11 @@ and an `'end'` event will follow. The only argument will be an instance of
Emitted when the remote peer closes the connection without sending us a CLOSE
frame. An `'end'` event will follow.

#### Event: 'end'
#### Event: 'end' (code, reason)

Emitted once when the socket is closing.
Emitted once when the socket is closing. If we received a graceful CLOSE
frame from the remote server, we will attempt to process it and pass `code`
and `reason` -- both of type `String`.

#### Event: 'text'

Expand Down Expand Up @@ -126,7 +128,8 @@ TEXT frame is sent.
#### WatershedConnection.end(reason)

Closes the connection. The RFC allows a reason for closing the connection to
be send in the CLOSE frame, though this is optional.
be send in the CLOSE frame, though this is optional. If passed, `reason`
should be a `String`.

#### WatershedConnection.destroy()

Expand Down

0 comments on commit 36cf93b

Please sign in to comment.