Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket client module #24

Merged
merged 4 commits into from
Dec 13, 2023
Merged

Conversation

adamchalmers
Copy link
Collaborator

@adamchalmers adamchalmers commented Dec 12, 2023

The KittyCAD Rust API client lets users connect to our WebSocket API. But OpenAPI can't tell users what the server expects to receive over that WebSocket, or what it intends to send over the WebSocket either.

This library solves the problem. It encapsulates the WebSocket connection from our API client, and adds methods to send and receive the correct types. This way users will always send the right types of requests and always receive the right types of responses.

Right now, this API sends over WebSocket text messages (JSON) to make it easier to debug with standard web debugging tools. But in the future, we can offer WebSocket binary messages (BSON), for faster de/encoding.

@adamchalmers adamchalmers force-pushed the achalmers/websocket-client-module branch 3 times, most recently from 480590b to 100214a Compare December 13, 2023 02:16
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@51707d3). Click here to learn what that means.

❗ Current head 202eef4 differs from pull request most recent head 555cce9. Consider uploading reports for the commit 555cce9 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #24   +/-   ##
=======================================
  Coverage        ?   22.87%           
=======================================
  Files           ?       28           
  Lines           ?     1587           
  Branches        ?        0           
=======================================
  Hits            ?      363           
  Misses          ?     1224           
  Partials        ?        0           
Flag Coverage Δ
unittests 22.87% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamchalmers adamchalmers force-pushed the achalmers/websocket-client-module branch 2 times, most recently from c53d655 to a4808e5 Compare December 13, 2023 02:54
@adamchalmers adamchalmers marked this pull request as ready for review December 13, 2023 02:56
@adamchalmers adamchalmers changed the title WIP: WebSocket client module WebSocket client module Dec 13, 2023
@adamchalmers adamchalmers force-pushed the achalmers/websocket-client-module branch 3 times, most recently from 079c64e to 76e158b Compare December 13, 2023 03:26
The KittyCAD Rust API client lets users connect to our WebSocket API. But OpenAPI can't tell users what the server expects to receive over that WebSocket, or what it intends to send over the WebSocket either.

This library solves the problem. It encapsulates the WebSocket connection from our API client, and adds methods to send and receive the correct types. This way users will always send the right types of requests and always receive the right types of responses.

Right now, this API sends over WebSocket text messages (JSON) to make it easier to debug with standard web debugging tools. But in the future, we can offer WebSocket binary messages (BSON), for faster de/encoding.
@adamchalmers adamchalmers force-pushed the achalmers/websocket-client-module branch from 76e158b to f787734 Compare December 13, 2023 18:51
@adamchalmers adamchalmers force-pushed the achalmers/websocket-client-module branch 2 times, most recently from 4684212 to 6347fed Compare December 13, 2023 22:38
@adamchalmers adamchalmers force-pushed the achalmers/websocket-client-module branch from 6347fed to 0981529 Compare December 13, 2023 22:39
@adamchalmers adamchalmers force-pushed the achalmers/websocket-client-module branch from 202eef4 to 555cce9 Compare December 13, 2023 22:43
@adamchalmers adamchalmers merged commit 38f333b into main Dec 13, 2023
6 checks passed
@adamchalmers adamchalmers deleted the achalmers/websocket-client-module branch December 13, 2023 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant