Update readme files

- Improve comparison with go.net package.
- Improve autobahn server description.
This commit is contained in:
Gary Burd 2014-04-20 21:14:06 -07:00
parent bbe4cde693
commit 82a29af075
2 changed files with 17 additions and 22 deletions

View File

@ -21,7 +21,7 @@ package API is stable.
### Protocol Compliance
The Gorilla WebSocket package passes the server tests in the [Autobahn WebSockets Test
The Gorilla WebSocket package passes the server tests in the [Autobahn Test
Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn
subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn).
@ -34,19 +34,19 @@ subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn
<th><a href="http://godoc.org/code.google.com/p/go.net/websocket">go.net</a></th>
</tr>
<tr>
<tr><td>Protocol support</td><td>RFC 6455</td><td>RFC 6455, see notes</td></tr>
<tr><td>Limit size of received message</td><td>Yes</td><td>No</td></tr>
<tr><td>Send pings and receive pongs</td><td>Yes</td><td>No</td></tr>
<tr><td>Send close message</td><td>Yes</td><td>No</td></tr>
<tr><td>Read message using io.Reader</td><td>Yes</td><td>No, see notes</td></tr>
<tr><td>Write message using io.WriteCloser</td><td>Yes</td><td>No, see notes</td></tr>
<tr><td colspan="3"><a href="http://tools.ietf.org/html/rfc6455">RFC 6455</a> Features</td></tr>
<tr><td>Passes <a href="http://autobahn.ws/testsuite/">Autobahn Test Suite</a></td><td><a href="https://github.com/gorilla/websocket/tree/master/examples/autobahn">Yes</td><td>No</td></tr>
<tr><td>Receive <a href="https://tools.ietf.org/html/rfc6455#section-5.4">fragmented</a> message<td>Yes</td><td><a href="https://code.google.com/p/go/issues/detail?id=7632">No</a></td></tr>
<tr><td>Send <a href="https://tools.ietf.org/html/rfc6455#section-5.5.1">close</a> message</td><td><a href="http://godoc.org/github.com/gorilla/websocket#hdr-Control_Messages">Yes</a></td><td><a href="https://code.google.com/p/go/issues/detail?id=4588">No</a></td></tr>
<tr><td>Send <a href="https://tools.ietf.org/html/rfc6455#section-5.5.2">pings</a> and receive <a href="https://tools.ietf.org/html/rfc6455#section-5.5.3">pongs</a></td><td><a href="http://godoc.org/github.com/gorilla/websocket#hdr-Control_Messages">Yes</a></td><td>No</td></tr>
<tr><td colspan="3">Other Features</tr></td>
<tr><td>Limit size of received message</td><td><a href="http://godoc.org/github.com/gorilla/websocket#Conn.SetReadLimit">Yes</a></td><td><a href="https://code.google.com/p/go/issues/detail?id=5082">No</a></td></tr>
<tr><td>Read message using io.Reader</td><td><a href="http://godoc.org/github.com/gorilla/websocket#Conn.NextReader">Yes</a></td><td>No, see note</td></tr>
<tr><td>Write message using io.WriteCloser</td><td><a href="http://godoc.org/github.com/gorilla/websocket#Conn.NextWriter">Yes</a></td><td>No, see note</td></tr>
<tr><td>Encode, decode JSON message</td><td>Yes</td><td>Yes</td></tr>
</table>
Notes:
- The go.net package does not handle fragmented messages.
- The go.net io.Reader and io.Writer operate across WebSocket frame boundaries.
Read returns when the input buffer is full or a frame boundary is
Note: The go.net io.Reader and io.Writer operate across WebSocket frame
boundaries. Read returns when the input buffer is full or a frame boundary is
encountered, Each call to Write sends a single frame message. The Gorilla
io.Reader and io.WriteCloser operate on a single WebSocket message.

View File

@ -1,13 +1,8 @@
# Test
# Test Server
Clients and servers for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite).
This package contains a server for the [Autobahn WebSockets Test Suite](http://autobahn.ws/testsuite).
To test different code paths in the package, the test server echoes messages two ways:
- Read the entire message using io.ReadAll and write the message in one chunk.
- Copy the message in parts using io.Copy
To test the server, run it
To test the server, run
go run server.go