Commit Graph

17 Commits

Author SHA1 Message Date
Gary Burd e2e3d8414d Document that default ping handler can block 2016-03-13 12:14:46 -07:00
Gary Burd 0e2713e645 Address common gotchas with package
Update documentation to explicitly state that applications must break out of a
read loop on error.

Detect application read loops spinning on a failed connection and panic.

Detect concurrent writes and panic. The detection is best-effort.

Update documentation to state that connections respond to close frames.
2016-02-16 15:03:54 -08:00
Valentin Hăloiu 6b3bf61ce8 Fix documentation typos 2016-02-11 02:22:44 +02:00
Gary Burd 423912737d Improve documentation 2015-10-19 15:05:01 -07:00
Craig Jellick 8ba5eaa6df Fix typo 2015-05-29 16:26:01 -07:00
Gary Burd 02eec998da Improve documentation. 2014-10-31 14:51:45 -07:00
Gary Burd 87f6f6a22e Add documentation about origin policy. 2014-10-12 09:34:51 -07:00
Gary Burd aef42a8ae6 Add note about reading the connection. 2014-07-07 09:33:43 -07:00
Gary Burd df94ef6daa Various improvements to Upgrader.
- Revert back to using Subprotocols []string. The protocol negotiation
  using Subprotocols should meet the needs of most applications.
  Applications are not locked into using this negotiation. An
  application can pick a protocol some other way and specify the
  protocol using the Sec-Websocket-Protocol response header.
- Parse the origin using url.Parse. This is the correct function to use
  when parsing a full URL.
- Improve comments.
2014-04-20 11:38:35 -07:00
Gary Burd 15aed3b4a4 Relicense to the Gorilla WebSocket Authors. 2014-04-18 14:25:11 -07:00
Joachim Bauch ecf9b98e31 Updated docs. 2014-04-18 00:40:10 +02:00
Daniel Darabos 1b37ccbb61 Fix small inconsistency in example. 2014-02-15 13:48:14 +01:00
Mark Dain 30354e97e2 Fixed Examples
- Typo ("conn.WriteMessaage" should be "conn.WriteMessage")
- Fixed Incorrect WriteMessage call:

    func (c *Conn) WriteMessage(messageType int, data []byte) error

But the example uses `_, err` when there is only 1 return type.
2013-12-31 11:00:58 +00:00
Gary Burd 5625e8a51f Fix tabs in overview examples. 2013-12-20 15:57:02 -08:00
Gary Burd 536d8dd066 Fix typo in Upgrade example. 2013-12-20 13:49:38 -08:00
Gary Burd 93b1570a27 Improve documentation.
- Introduce ReadMessage and WriteMessage before NextReader and
  NextWriter in the package comment. It's better to introduce the easy
  methods first.
- Move sections on message of types before the concurrency section.
2013-10-29 17:43:03 -07:00
Gary Burd 273ecadfca Initial commit 2013-10-16 16:30:59 -07:00