Commit Graph

368 Commits

Author SHA1 Message Date
Eric Urban ade0fc90f7 Correct documentation, the "ReadJSON" function depends on "Unmarshal", not "Marshal" 2014-08-10 20:42:52 -05:00
Gary Burd f940e88c0e Merge pull request #37 from jcbohin/patch-1
Changing a swap in README.md for autobahn
2014-08-04 22:03:22 -07:00
Jean-Christophe Bohin acc8d8706f Changing a swap in README.md for autobahn
Autobahn test suite configuration fuzzingclient.json refers to 'clients' folder, but README.md refers to server. I changed README.md to clients, although I can't figure a good way to choose between changing README.md for 'clients' or fuzzingclient.json for servers. both seems legit to me, depending on what side you see things. Feel free to dismiss/decline my PR if you think the former makes more sense in this context.
2014-08-04 23:58:41 +02: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 aef42a8ae6 Add note about reading the connection. 2014-07-07 09:33:43 -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 411599d366 Cleanup client/server tests. 2014-07-05 08:49:11 -07:00
Gary Burd 0f32413e5e Relax default origin test.
Update the default origin test to treat no origin specified as OK. If
the client can create a request without the origin set, then the client
can also create a request with an arbitrary origin.
2014-06-30 14:57:20 -07:00
Gary Burd 3d0e89148e Clear deadlines set by HTTP server. 2014-06-29 19:47:15 -07:00
Gary Burd bc19d3d337 Improve chat example.
- Log all handshake errors.
- Prevent double close on send channel.
2014-06-27 13:08:22 -07:00
Gary Burd d2dc86f575 Add maskBytes benchmark. 2014-06-27 13:06:07 -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 95caf726f7 Update README.md
typos
2014-06-05 13:56:06 -07:00
Gary Burd 6afc23d053 Improve readme. 2014-06-03 15:01:48 -07:00
Gary Burd d832908d2b Add note about Chrome message fragmentation to readme 2014-06-03 14:47:02 -07:00
Gary Burd 10a95d14a3 Merge pull request #27 from AeroNotix/patch-1
Typo fix
2014-05-10 06:54:10 -07:00
Aaron France b98fe92f10 Typo fix 2014-05-10 14:30:27 +02:00
Gary Burd db7a2a1679 Improve client host header handling.
- Set request host header to substring of the URL. Do not add default
  port to string.
- Do not include port when verifying TLS host name.
2014-05-08 11:21:56 -07:00
Gary Burd 1e6e1281b0 Clear upgrader handshake deadline. 2014-04-21 06:28:28 -07:00
Gary Burd db1c080f90 Improve readme. 2014-04-20 21:48:25 -07:00
Gary Burd 82a29af075 Update readme files
- Improve comparison with go.net package.
- Improve autobahn server description.
2014-04-20 21:14:06 -07:00
Gary Burd bbe4cde693 Use Upgrader in client/server test. 2014-04-20 12:08:24 -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 f867cb5c72 Cleanup issues reported by golint. 2014-04-20 07:20:03 -07:00
Gary Burd f5c69ea9ed Improve comparison with other packages in readme. 2014-04-19 07:16:39 -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
Joachim Bauch 0a7cd15dd1 Make subprotocol negotiation more flexible. 2014-04-18 00:25:32 +02:00
Joachim Bauch 2b15a66741 Simplified returning of errors. 2014-04-18 00:20:46 +02:00
Joachim Bauch 018944708b Removed unnecessary call to "http.Error". 2014-04-18 00:14:23 +02:00
Joachim Bauch 8827bd1a23 Moved Upgrader variable to package level. 2014-04-18 00:13:15 +02:00
Joachim Bauch b03dcbad2a Updated Origin check.
The host in the Origin header must match the host of the request by default.
2014-04-18 00:07:36 +02:00
Joachim Bauch f99474eb97 Renamed constants to match Go style guidelines. 2014-04-17 23:46:48 +02:00
Joachim Bauch 56543ef6d6 Moved Upgrader code to server implementation. 2014-04-17 23:45:40 +02:00
Joachim Bauch 2c95e6b09f Support "Sec-Websocket-Protocol" for old-style "Upgrade" calls. 2014-04-16 18:18:28 +02:00
Joachim Bauch 9474333b60 Use new Upgrader API in examples 2014-04-16 17:42:15 +02:00
Joachim Bauch b2f990180a Implement Upgrader API (#6). 2014-04-16 17:25:17 +02:00
Gary Burd 03206ef31e Various improvements to README files. 2014-03-20 13:26:28 -07:00
Gary Burd 05618edccc Add file watcher example. 2014-03-20 12:25:30 -07:00
Gary Burd 4ec58d24a4 Merge pull request #21 from longsleep/underlyingConn
Added helper function UnderlyingConn to retrieve net.Conn from Conn objects.
2014-03-18 09:27:49 -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 119002ce04 Merge pull request #16 from darabos/patch-1
Fix small inconsistency in example.
2014-02-17 21:22:10 -08:00
Daniel Darabos 1b37ccbb61 Fix small inconsistency in example. 2014-02-15 13:48:14 +01:00
Gary Burd 92334662ba Merge pull request #14 from ancarda/master
Fixed Examples
2013-12-31 08:31:07 -08: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 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 7274f97ac5 Merge pull request #12 from 29decibel/master
fix typo in ReadJSON deprecated comments
2013-12-23 11:42:01 -08:00