Commit Graph

13 Commits

Author SHA1 Message Date
Dmitriy Ryajov 3923a9be20
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 09:30:21 -06:00
Arijit Das a1ae7d2c70
[WIP] Web socket client implementation. (#2)
* Implement websocket server.

* Implement websocket client.

* Run nimpretty.

* Remove commented code.

* Address comments.

* Address comments on websocket server.

* Use seq[byte] to store data.

* Working bytes conversion.

* Remove result from return

* Refactor the code.

* Minor change.

* Add test.

* Add websocket test and fix closing handshake.

* Add MsgReader to read data in external buffer.
2021-03-10 21:34:14 -06:00
Arijit Das 8e34e0f138 Remove ws.nim file. 2021-01-05 18:29:06 +05:30
Arijit Das 350fa94418 Add HTTP and websocket client. 2021-01-05 18:27:46 +05:30
Arijit Das fa37c87dd5 Parse Frame and handle different message type. 2020-12-15 18:39:50 +05:30
Arijit Das 8fb4e78353 Support Websocket handshake and update the readme. 2020-12-08 18:19:22 +05:30
Arijit Das a1c1c37a41 Update the readme instruction to test the server. 2020-12-08 15:45:21 +05:30
Arijit Das d4901f1cba Add callback handler for HTTP server 2020-12-08 15:39:11 +05:30
Arijit Das 8755d03265 Implement a HTTP server using httputils package 2020-12-08 01:17:45 +05:30
Arijit Das 19a573e756 Add Todo to use chronos async fd 2020-12-01 19:19:13 +05:30
Arijit Das afb7e4d86e Fix package import 2020-12-01 18:53:27 +05:30
Arijit Das 22cefcfd4b Minor nit 2020-12-01 18:32:41 +05:30
Arijit Das 3b69187007 Implement web socket handshake 2020-12-01 18:13:59 +05:30