websockets-rs / websockets-rs/rust-websocket

Closing connection

Open
#259 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
225
PR merge metrics
No merged PRs in 30d

Description

I am using crate to connect ws client to a device server using socket.io which is able to switch to websockets. I am connecting to device using url ws://ipaddress/socket.io/?EIO=3&transport=websocket.

This connects fine and I am getting messages from the device but after about 80 seconds it receives a Close notification which I am unable to track down. If I connect via browser to device and connect using socket.io library the connection stays alive. In browser code (using socket.io) I am not specifically sending and packets to the device so am not sure if I am getting Close message due to me not sending any data to the device (device with socket server) or whether Close is generated on websocket Client side due to too infrequent messages (server sends message roughly every 20 seconds).

Should I be sending periodic messages to the server? Or is it due to infrequent messages from server (I don't think it is this).

Appreciate any feedback ideas - busy digging into info....

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names no repository file or test; start by reproducing the connection to ws://ipaddress/socket.io/?EIO=3&transport=websocket and capture the close notification at roughly 80 seconds. Compare the Rust client behavior with the browser's socket.io connection, focusing on whether periodic messages or heartbeat traffic is involved; done means identifying the cause and documenting a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.