Commit Graph

384 Commits

Author SHA1 Message Date
misu 8e146c3b73 mod: remove unnecessary field 2018-02-01 19:04:12 +09:00
misu 7c6832cc73 mod: NextWriter if compress 2018-02-01 18:38:15 +09:00
misu 83a133897c mod: NextReader if compress 2018-02-01 18:34:03 +09:00
misu e7575e215d upgrade: compressContextTakeover reader 2018-02-01 18:26:02 +09:00
misu aca4275801 Merge branch 'feature/upgrade_writer' into feature/context-takeover 2018-02-01 15:06:24 +09:00
misu b9e2343c7d mod: set compressionLevel to conn, if EnabeleCompression 2018-02-01 15:05:47 +09:00
smith30 ee5a233748
Merge pull request #14 from smith-30/feature/upgrade_writer
mod: client & server setting for context-takeover
2018-02-01 14:58:15 +09:00
misu 3452ab8a61 mod: client & server setting for context-takeover 2018-02-01 14:57:00 +09:00
smith30 b822eaaf2b
Merge pull request #13 from smith-30/feature/upgrade_writer
Feature/upgrade writer
2018-02-01 13:00:26 +09:00
misu f8b4a0f71d mod: flate.writer for context-takeover 2018-02-01 12:59:30 +09:00
misu fb7d67a34a mod: fmt variables of conn.go 2018-02-01 11:56:17 +09:00
Gary Burd 4ac909741d
Improve control message handler doc
Fixes #338
2018-01-31 17:52:56 -08:00
misu ee46f8548a add: comment 2018-01-31 20:52:04 +09:00
misu 62df16a55d mod: compressContextTakeover method. 2018-01-31 19:40:12 +09:00
misu fededdd187 mod: detach compressContextTakeover method and add debug comment. 2018-01-31 19:30:05 +09:00
smith30 b2e3d3e30b
Merge pull request #12 from smith-30/feature/upgrade_writer
Feature/upgrade writer
2018-01-30 19:07:54 +09:00
misu 2472e6d800 upgrade: use pool for writerdict 2018-01-30 19:02:50 +09:00
misu f2a68e2d21 add: call compress method test 2018-01-30 18:37:52 +09:00
misu a9475f2ccf mod: remove judge dict nil 2018-01-29 18:12:43 +09:00
misu e2dd00db3d mod: dict strategy 2018-01-29 15:10:19 +09:00
smith30 d0e8769234
Merge pull request #11 from smith-30/feature/add_test
Feature/add test
2018-01-26 17:54:04 +09:00
misu e873eb1ee0 mod: test and write compression 2018-01-26 17:52:23 +09:00
Gary Burd 91f589db02
Improve check origin documentation
Remove the example code to disable origin checks from the documentation.
I am concerned that developers are copying the code without
understanding the security implications of the code. Most applications
should not use this code.

Change the bad origin error message to mention Upgrader.CheckOrigin

Mention cross-site request forgery in the Upgrader.CheckOrigin doc.
2018-01-25 10:51:21 -08:00
misu 70abf7287b mod: .gitignore to ignore .test file 2018-01-25 19:01:58 +09:00
smith30 67b993939f
Merge pull request #10 from smith-30/feature/mod_add_dict
mod: add dict process
2018-01-25 14:00:15 +09:00
misu 80a809717d mod: add dict process 2018-01-25 13:55:52 +09:00
smith30 bf99740cc4
Merge pull request #8 from smith-30/feature/remove_dict_lock
mod: remove mutex.
2018-01-24 23:09:56 +09:00
misu cecdf7ced4 mod: remove mutex. 2018-01-24 23:09:03 +09:00
smith30 538a96d70f
Merge pull request #7 from smith-30/feature/client_context_takeover
add: context-takeover option to client
2018-01-24 20:01:03 +09:00
misu dfe35b789b add: context-takeover option to client 2018-01-24 20:00:09 +09:00
smith30 ad97036825
Merge pull request #6 from smith-30/feature/split_dict
mod: split dict to rx and tx
2018-01-24 18:10:20 +09:00
misu eec63bf9bc mod: split dict to rx and tx 2018-01-24 18:08:43 +09:00
smith30 8ddcb400fb
Merge pull request #4 from smith-30/feature/impl_compressContextTakeover
Feature/impl compress context takeover
2018-01-24 18:02:42 +09:00
misu f7abc95255 mod: method args name 2018-01-24 18:01:48 +09:00
misu a366cdf616 impl: compressContextTakeover 2018-01-24 17:53:38 +09:00
misu 36c43970ee impl: decompressContextTakeover 2018-01-24 16:52:47 +09:00
misu e0da4e377f mod: .gitignore 2018-01-21 17:56:13 +09:00
misu a2b487748b Merge branch 'feature/add_extension_header' into feature/impl_decompressContextTakeover 2018-01-21 15:28:20 +09:00
misu 9177fe8645 mod: comment out 2018-01-21 15:11:58 +09:00
misu 785fa70cb3 add server header option 2018-01-21 15:10:50 +09:00
misu 053a620207 add: validation 2018-01-19 01:43:04 +09:00
misu 8a8329be68 modify: header option 2018-01-18 01:41:59 +09:00
Gary Burd 292fd08b25
Replace "frame" with "message" in documentation
The documentation sometimes used the term "frame" when referring to
single frame control messages.  Use the term "message" for consistency
in the documentation and to hide a detail that most application
programmers do not need to know about.
2018-01-10 06:15:25 -08:00
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
Gary Burd d965e9adc6
Handle no status in FormatCloseMessage
Return empty message for CloseNoStatusReceived. This status indicates
that the message is empty, so make it so. Because it's illegal to send
CloseNoStatusReceived, this change should not break a correct
application.
2017-12-28 07:29:59 -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 c55883f973
Add parseExtensions test case (#310) 2017-12-05 11:45:40 -08:00
Gary Burd b89020ee79
Add SOCKS5 support
- Bundle the golang.org/x/net/proxy package to x_net_proxy.go. The
package contains a SOCKS5 proxy. The package is bundled to avoid adding
a dependency from the weboscket package to golang.org/x/net.
- Restructure the existing HTTP proxy code so the code can be used as a
dialer with the proxy package.
- Modify Dialer.Dial to use proxy.FromURL.
- Improve tests (avoid modifying package-level data, use timeouts in
tests, use correct proxy URLs in tests).

Fixes #297.
2017-11-30 17:43:01 -08:00
Gary Burd 8c6cfd493d
Improve bad handshake error text
Change the error text for bad handshake errors from

    websocket: not a websocket handshake:

to:

    websocket: the client is not using the websocket protocol:

The new text should be more helpful to developers who do not know or
understand the details of the protocol.

Test for bad handshake before other request errors.
2017-11-30 16:45:44 -08:00
fising 2b58522131 update README.md 2017-11-29 07:20:15 -08:00