This website requires JavaScript.
Explore
Help
Sign In
status-im
/
nim-websock
mirror of
https://github.com/status-im/nim-websock.git
Watch
2
Star
0
Fork
You've already forked nim-websock
0
Code
Issues
Projects
Releases
Wiki
Activity
a96a123bfe
nim-websock
/
tests
/
testcommon.nim
6 lines
93 B
Nim
Raw
Normal View
History
Unescape
Escape
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 16:47:24 +00:00
{.
warning
[
UnusedImport
]
:
off
.
}
Rework (#5) * Use seq[byte] to store data. * Working bytes conversion. * Refactor the code. * Add test. * Add websocket test and fix closing handshake. * Add MsgReader to read data in external buffer. * rework frame reading * don't do toTitleCase * fix examples * use byte for more comfort * rework message reading + api * fix tests * adding specific exception types * minor cleanup * fixing tests * more tests * check the fin flag at the correct place * info for debug * split data not encoded frames * more tests * wip - control messages * closing flow and more explicit exception handling * test close and pings * add tests task to nimble * adding ci * change recv semantics * add frame tests * remove echo * better frame tests * fix * fix * handle continuation frames properly * more close logic handling * wip tests * handle close reasons properly * test control frames encoding * don't pass ws to event callbacks * fix masking and use correct base64 encoding * fix ci * addressing review comments * fix client example * i386 ci fix * wip ci * fix reading offset * don't read if socket closed * fix ci * wip * don't read if socket is closed Co-authored-by: Arijit Das <arijit@status.im> Co-authored-by: Arijit Das <arijitad.in@gmail.com>
2021-03-18 15:30:21 +00:00
import
.
/
testframes
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 16:47:24 +00:00
import
.
/
testutf8
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 20:04:09 +00:00
import
.
/
testextutils