Page MenuHomePhabricator

[backup] Implement basic websocket
ClosedPublic

Authored by michal on Dec 22 2023, 7:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 8, 10:00 PM
Unknown Object (File)
Sat, Nov 23, 6:01 AM
Unknown Object (File)
Nov 16 2024, 7:33 PM
Unknown Object (File)
Nov 16 2024, 7:33 PM
Unknown Object (File)
Nov 16 2024, 7:33 PM
Unknown Object (File)
Nov 16 2024, 7:33 PM
Unknown Object (File)
Nov 16 2024, 7:33 PM
Unknown Object (File)
Nov 16 2024, 7:33 PM
Subscribers

Details

Summary

ENG-5329, ENG-5330

This is the basic websocket setup that will be used for adding download/upload log requests. It will be expanded it the future diffs.

Depends on D10452

Test Plan
  • made a new websocket connection
  • tested if responding to pings with pongs kept the socket alive
  • tested sending a binary message and checking if we got it back

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

services/backup/src/http/handlers/log.rs
104–135

This is implemented based on one of the actix examples. I had trouble testing this behaviour, I think this is more of an implementation detail for web socket clients (e.g. I've read that chrome sometimes sends them). They weren't sent with my testing with tungstenite. Not sure if I should leave them or remove this code and just return an error.

bartek added inline comments.
services/backup/src/http/handlers/log.rs
40

I prefer this

103
104–135

I'd leave it as is and just add a comment above

This revision is now accepted and ready to land.Jan 5 2024, 12:27 AM
This revision was landed with ongoing or failed builds.Jan 8 2024, 7:20 AM
This revision was automatically updated to reflect the committed changes.