Commit Graph

14 Commits

Author SHA1 Message Date
Gary Burd 47f93dfaed Improve errors.
- Use new closeError type for reporting close frames to the application.
- Use closeError with code 1006 when the peer closes connection without
  sending a close frame. The error io.ErrUnexpectedEOF was used
  previously. This change helps developers distinguish abnormal closure
  and an unexpected EOF in the JSON parser.
2014-10-31 14:52:20 -07:00
Gary Burd bda3d7d128 Fix mask key. 2014-07-23 20:32:33 -07:00
Gary Burd 10afcadf69 Cleanup EOF handling.
- Modify data message reader to return io.ErrUnexpectedEOF if a close
  message is received before the final frame of the message.
- Modify NextReader to return io.ErrUnexpectedEOF if underlying
  connection returns io.EOF before a close message.
2014-07-10 19:36:51 -07:00
Gary Burd 0e7b5f878f Do not mask bytes when reading on the client.
- The bytes were masked with zero, a nop.
- Add test for control messages.
2014-07-05 13:56:34 -07:00
Gary Burd efd7f76a14 Cleanup read operations.
- Use io.ReadFull instead of similar function in package.
- Return from Read with partial data. Don't attempt to fill buffer.
- Do not return net.Error with Temporary() == true
2014-06-06 09:48:50 -07:00
Gary Burd f4076986b6 Improve Set{Read,Write}Deadline doc.
The new doc is inspired by the crypto/tls doc.
2014-06-05 15:19:54 -07:00
Gary Burd f867cb5c72 Cleanup issues reported by golint. 2014-04-20 07:20:03 -07:00
Gary Burd 15aed3b4a4 Relicense to the Gorilla WebSocket Authors. 2014-04-18 14:25:11 -07:00
Simon Eisenmann ccad3db007 Added helper function UnderlyingConn to retrieve net.Conn from Conn objects. 2014-03-18 15:26:10 +01:00
Gary Burd 707d1f6c6b Cleanup issues reported by golint. 2013-12-23 12:08:49 -08:00
Gary Burd 67d178946a Implement net.Error on timeout errors.
Fixes #10.
2013-12-23 12:01:25 -08:00
Gary Burd b118f62ec0 Add subprotocol negotiation to Dialer. 2013-12-14 08:06:24 -08:00
Gary Burd 1627eef2a3 Improve documentation. 2013-10-27 08:34:33 -07:00
Gary Burd 273ecadfca Initial commit 2013-10-16 16:30:59 -07:00