Commit Graph

114 Commits

Author SHA1 Message Date
Adrien Marquès e7c84eddf8
refactor: semantic and idiomatic renames, fixes API changes 2021-06-16 00:04:09 +02:00
Adrien Marquès 9e69b66289
fix: use fmt.Errorf() %w verb for error wrapping 2021-06-15 22:13:36 +02:00
Adrien Marquès d092eaed01
refactor: normalise internal/uri 2021-05-14 17:23:33 +02:00
Adrien Marquès 6c47dbc38f
refactor: http/upgrade normalise files 2021-05-14 17:19:02 +02:00
Adrien Marquès db52cfd28f refactor: move to go modules and lint 2021-05-14 16:47:02 +02:00
Adrien Marquès 7fb4241187 go fmt/vet 2018-09-29 14:39:12 +02:00
Adrien Marquès a9986c3123 update structure according to proper go project 2018-09-29 14:36:47 +02:00
xdrm-brackets 53de261a43 add possible PONG receive during fragmented messages + add tests for 'Message.check(bool) err' 2018-05-08 17:21:49 +02:00
xdrm-brackets 927b83556f direct close on 'ErrUnexpectedContinuation' + only check TEXT utf8 when final frame 2018-05-08 12:10:24 +02:00
xdrm-brackets fc9f174434 add RSV bytes error if set + add function 'readBytes(io.Reader, []bytes)' to read until the expected size is met while there is no error (for octet-wise chops) 2018-05-08 11:52:34 +02:00
xdrm-brackets fff5d068d1 manage normal close in response to close frame 2018-05-08 11:31:37 +02:00
xdrm-brackets ca3b83abee add message check as 'function -> method' 2018-05-08 11:15:45 +02:00
xdrm-brackets 1891bdff1d fix send length + add test for simple/extended-16/extended-64 length 2018-05-07 19:25:54 +02:00
xdrm-brackets 6759c489cc add FRAGMENTATION + refactored error management (not perfect but works) 2018-05-07 16:35:40 +02:00
xdrm-brackets b7cd292577 add tests for mask read size 2018-05-06 14:47:34 +02:00
xdrm-brackets 613620998a add test to check read size 2018-05-06 14:45:44 +02:00
xdrm-brackets 26864aab55 manage invalid read size + minmod 2018-05-06 14:45:38 +02:00
xdrm-brackets 75f568a1ec manage invalid Close codes + close() now can work without sending the CLOSE frame (if status=NONE)
[TODO] manage fragmentation
2018-05-06 01:37:02 +02:00
xdrm-brackets f07afb8c85 manage invalid error code (size=1) and too long reason (size>125) 2018-05-06 01:06:17 +02:00
xdrm-brackets ec1722a804 handle panic() 2018-05-06 01:05:52 +02:00
xdrm-brackets 86dba9aa0b chunk message writer 2018-05-06 01:05:38 +02:00
xdrm-brackets 361684f634 add simple tests for Send() 2018-05-06 00:28:02 +02:00
xdrm-brackets 98ce1dddbe fix Send(): FINAL + TYPE were hard-coded 2018-05-06 00:27:45 +02:00
xdrm-brackets 7fa43b2c00 [message] added 'UnmaskedFrameErr' managed on [client] + removed unused lib + add tests for ReadMessage simple cases 2018-05-06 00:18:01 +02:00
xdrm-brackets dadd3cd479 make Send() generic with 'io.Writer' 2018-05-05 23:53:38 +02:00
xdrm-brackets 89124221fb minmod 2018-05-05 23:53:06 +02:00
xdrm-brackets 14205a0b2e fix message length 2018-05-05 23:53:00 +02:00
xdrm-brackets d03e08b466 opti 2018-05-05 18:47:38 +02:00
xdrm-brackets dfeba31404 no more channels with message pointers, only Messages (controller can close a client by closing the 'send' channel)
+ fixed channel closing (so as goroutines) when ending connections
2018-05-05 18:43:16 +02:00
xdrm-brackets 4f85752052 close sending channel (no more memory error, sending goroutine killed) -> TODO: manage already closed channels 2018-05-05 17:43:49 +02:00
xdrm-brackets 858d409834 made it more generic (io.Reader, simple Write, etc) 2018-05-05 17:39:39 +02:00
xdrm-brackets 009f34e436 fix Store of Client that can be anything, not empty struct 2018-05-05 17:39:10 +02:00
xdrm-brackets 0891ebbe8e removed useless 2018-05-05 17:38:55 +02:00
xdrm-brackets 52067c7640 close() closes channels to free goroutines
reader/writer are no more methods -> functions
added reference to server.unregister
some more stuff
2018-05-05 17:38:07 +02:00
xdrm-brackets e56ff09fc8 add Host tests 2018-05-04 08:53:15 +02:00
xdrm-brackets dc510ad5d9 refactor upgrade.request + merge 'upgrade.reqline' + began tests 2018-05-04 08:41:40 +02:00
xdrm-brackets b713011e7b comment non-bloquing read 2018-05-04 07:34:58 +02:00
xdrm-brackets ab351de382 non-blocking reads (+ added peek-er to check connection every 10us) 2018-05-03 21:10:02 +02:00
xdrm-brackets 52673ba7e5 removed 'upgrader' interface 2018-05-03 19:50:30 +02:00
xdrm-brackets a31269118f BIG UPDATE; brand new code structure (1 public package) + read by chunks if needed 2018-05-03 19:31:09 +02:00
xdrm-brackets 2d51ba1863 typed message type + added CONTINUATION 2018-05-03 14:54:02 +02:00
xdrm-brackets 378534153c removed unused 2018-05-03 14:51:12 +02:00
xdrm-brackets 09b3cc8921 add close case (payload size = 0) 2018-05-02 23:47:00 +02:00
xdrm-brackets 0ed39dec0e remove debug + clean main 2018-05-02 22:56:38 +02:00
xdrm-brackets a887bcd0b9 removed debug 2018-05-02 22:43:05 +02:00
xdrm-brackets 5837c1cdb9 Merge branch 'master' of gogs:xdrm-brackets/gws 2018-05-02 22:39:14 +02:00
xdrm-brackets e9b66b87b7 BIGFIX (fuck it) 2018-05-02 22:39:09 +02:00
xdrm-brackets 4e0b13a031 BIGFIX (fuck it) 2018-05-02 22:36:59 +02:00
xdrm-brackets 9abf760e37 BIGUPDATE: new execution structure + package structure (debug to remove later) + Write does not work... yet 2018-05-02 22:24:50 +02:00
xdrm-brackets 4ec4dfd1d5 big update ! to fix 2018-05-01 22:14:35 +02:00