dart-lang / dart-lang/http

I wonder how to detect a disconnect event happening.

Open
#1,629 3 comments 0 reactions 0 assignees View on GitHub
package:web_socket_channel
Dominant language
Dart
Stars
1.1k
Forks
419
Avg merge
4d 14h
Merged PRs (30d)
8

Description

I do not see a method called onDisconnect to simplify this, like in golang side , melody framework, there is a HandleDisconnect.

What I saw is that even my wifi is on, some times the web socket just get disconnected, and there is no signal emitted, or I do not know how to listen to the event, is there anyone can provide some pointer to this issue?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the Dart HTTP package's existing request and connection APIs, then compare their behavior with the reported websocket disconnect case and the HandleDisconnect example from the issue. No source file, test, or entry point is named, so the first step is to identify where connection lifecycle events are exposed and define the expected signal for an unexpected disconnect.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.