1 # Gorilla WebSocket |
1 # Gorilla WebSocket |
|
2 |
|
3 [![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket) |
|
4 [![CircleCI](https://circleci.com/gh/gorilla/websocket.svg?style=svg)](https://circleci.com/gh/gorilla/websocket) |
2 |
5 |
3 Gorilla WebSocket is a [Go](http://golang.org/) implementation of the |
6 Gorilla WebSocket is a [Go](http://golang.org/) implementation of the |
4 [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. |
7 [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. |
5 |
|
6 [![Build Status](https://travis-ci.org/gorilla/websocket.svg?branch=master)](https://travis-ci.org/gorilla/websocket) |
|
7 [![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket) |
|
8 |
8 |
9 ### Documentation |
9 ### Documentation |
10 |
10 |
11 * [API Reference](http://godoc.org/github.com/gorilla/websocket) |
11 * [API Reference](http://godoc.org/github.com/gorilla/websocket) |
12 * [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) |
12 * [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) |
25 go get github.com/gorilla/websocket |
25 go get github.com/gorilla/websocket |
26 |
26 |
27 ### Protocol Compliance |
27 ### Protocol Compliance |
28 |
28 |
29 The Gorilla WebSocket package passes the server tests in the [Autobahn Test |
29 The Gorilla WebSocket package passes the server tests in the [Autobahn Test |
30 Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn |
30 Suite](https://github.com/crossbario/autobahn-testsuite) using the application in the [examples/autobahn |
31 subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). |
31 subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). |
32 |
32 |
33 ### Gorilla WebSocket compared with other packages |
33 ### Gorilla WebSocket compared with other packages |
34 |
34 |
35 <table> |
35 <table> |
38 <th><a href="http://godoc.org/github.com/gorilla/websocket">github.com/gorilla</a></th> |
38 <th><a href="http://godoc.org/github.com/gorilla/websocket">github.com/gorilla</a></th> |
39 <th><a href="http://godoc.org/golang.org/x/net/websocket">golang.org/x/net</a></th> |
39 <th><a href="http://godoc.org/golang.org/x/net/websocket">golang.org/x/net</a></th> |
40 </tr> |
40 </tr> |
41 <tr> |
41 <tr> |
42 <tr><td colspan="3"><a href="http://tools.ietf.org/html/rfc6455">RFC 6455</a> Features</td></tr> |
42 <tr><td colspan="3"><a href="http://tools.ietf.org/html/rfc6455">RFC 6455</a> Features</td></tr> |
43 <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</a></td><td>No</td></tr> |
43 <tr><td>Passes <a href="https://github.com/crossbario/autobahn-testsuite">Autobahn Test Suite</a></td><td><a href="https://github.com/gorilla/websocket/tree/master/examples/autobahn">Yes</a></td><td>No</td></tr> |
44 <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>, see note 1</td></tr> |
44 <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>, see note 1</td></tr> |
45 <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> |
45 <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> |
46 <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> |
46 <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> |
47 <tr><td>Get the <a href="https://tools.ietf.org/html/rfc6455#section-5.6">type</a> of a received data message</td><td>Yes</td><td>Yes, see note 2</td></tr> |
47 <tr><td>Get the <a href="https://tools.ietf.org/html/rfc6455#section-5.6">type</a> of a received data message</td><td>Yes</td><td>Yes, see note 2</td></tr> |
48 <tr><td colspan="3">Other Features</tr></td> |
48 <tr><td colspan="3">Other Features</tr></td> |