Commit Graph

6 Commits

Author SHA1 Message Date
Gary Burd 58729a2165
Don't log 1006 error in chat example
This error is expected (Safari closes connections without sending a close
frame).

Fixes #323
2018-01-09 12:15:58 -08:00
Jordan Pittier cdedf21e58 examples/chat/client.go: avoid allocating []byte{} for PingMessage (#312)
It's useless and only gives more work to the GC.
2017-12-09 19:53:53 -08:00
Gary Burd ea4d1f681b Reduce memory used in chat example 2017-06-20 12:01:03 -07:00
Shivam Mamgain dc13401989 Fix documentation
Specify correct function name in README
2016-11-12 16:02:12 +05:30
Gary Burd 6257d10a8b Improve chat example
- Discuss concurrency and message coalescing in the README.
- Add comments to client.go explaining how concurrency requirements are
  met.
- Prevent developers from calling the Client.write method from outside
  of the writePump goroutine by removing the method. The code is now
  inlined in Client.writPump.
2016-10-25 16:48:54 -07:00
Gary Burd 5e2e56d5df Improve chat example
- Remove jQuery.
- Rename Conn to Client to avoid confusion with underlying ws
  connection.
- Remove global variables.
2016-07-18 16:08:34 -07:00