Commit Graph

12 Commits

Author SHA1 Message Date
Tanguy Cizain 781cb35200
Fix mutual closing (#76)
* add mutual closing test

* fix mutual closing
2021-06-28 14:52:18 +02:00
jangko 3a0834943d
fixes copyright header in each .nim file 2021-06-20 11:28:38 +07:00
andri lim f80278aeee
implement frame reader for buffered payload (#55)
now the frame can choose to read from buffered
payload if available or read from asyncstream
if the buffer is empty
2021-06-14 13:41:31 -06:00
Dmitriy Ryajov 480560c7c8
don't await `nil` futures 2021-06-11 20:53:34 -06:00
Dmitriy Ryajov deb46fef31
fix messages with multiple empty frames (#61) 2021-06-11 20:14:53 -06:00
Dmitriy Ryajov 1188bf3c0b
fix limits tests (#59) 2021-06-11 19:05:06 -06:00
Dmitriy Ryajov 03744f37c7
Fix autobahn tls tests (#57)
* split out message and control frames sending

* fix premature closure under TLS

* dissable hints noise
2021-06-11 18:40:56 -06:00
Dmitriy Ryajov 3e1599d790
Fix partial frame handling and allow extensions to hijack the flow (#56)
* moving files around

* wip

* wip

* move tls example into server example

* add tls functionality

* rename

* rename

* fix tests

* move extension related files to own folder

* use trace instead of debug

* export extensions

* rework partial frame handling and closing

* rework status codes as distincts

* logging

* re-enable extensions processing for frames

* enable all test for non-tls server

* remove tlsserver

* remove offset to mask - don't think we need it

* pass sessions extensions when calling send/recv

* adding encode/decode extensions flow test

* move server/client setup to helpers

* proper frame order execution on decode

* fix tls tests
2021-06-11 14:04:09 -06:00
Dmitriy Ryajov e632202037
wip: modeling extensions api (#48) 2021-06-01 14:24:00 -06:00
Dmitriy Ryajov 64da1a4344
Rework http (#38)
* wip

* wip

* move http under ws folder

* use asyctest

* wip

* wip

* rework response sending

* make example work with latest changes

* wip request/response

* misc

* fix example to use new http layer

* pass tls flags to client

* more cleanup

* unused imports

* more unsused imports

* better headers

* add helpre sendError

* export sendError

* attach selected proto to session

* move proto to session

* handle unsupported version

* fix tests

* comment out for now

* fix utf8 tests

* allow tests to be ran in tls

* misc

* use Port type

* add tls flags

* better api

* run tls tests

* fix tests on windows

* allow running tests with tls

* mic

* wip

* fix autobahn ci

* handle close

* cleanup

* logging and error handling

* remove old stream
2021-05-31 20:39:14 -06:00
andri lim 90c664545d
implement UTF8 handling (#35)
* implement UTF8 handling

or to be precisely, we add UTF8 validator which main duty
is to detect malformed UTF8 sequence using a fast DFA UTF8
decoder.

also enable autobahn UTF8 category tests, much more green :)

fixes #13

* fixes case 7.5.1 Send a close frame with invalid UTF8 payload

* add tests for validateUTF8

- tests for validateUTF8 in raw mode
- tests for validateUTF8 in websocket client/server
2021-05-28 10:47:24 -06:00
Dmitriy Ryajov eb62ec1725
Extract session (#31)
* extract websocket session

* fix tests

* fix frame tests
2021-05-25 16:39:10 -06:00