- 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.
- 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.
- 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.