Comments (5)
I guess 'events' here might be 'exceptions'. Such as:
-
connected
-
disconnected
-
message sent
-
message send failed
from web_socket_channel.
Specific event listener is necessary in some scenarios. Hope to have it.
I made an implementation here of this npm wrapper over the IOWebSocketChannel. Implements requests and messages based on events like socket.io
from web_socket_channel.
What do you mean by "event"? A web socket is a duplex communication channel - it doesn't define anything in terms of "event".
The Stream
API doc talk about "events" - in as much as you can get the stream for a web socket channel you can deal with events in any way you can with a stream, but I don't know what "specific" would mean in that context.
Perhaps you're meaning events like DOM events? In that case you'll want to look at the APIs around dart:html
from web_socket_channel.
connected is the onOpen
event, but I didn't see any api about this in this package.
https://api.dartlang.org/stable/2.4.0/dart-html/WebSocket/onOpen.html
from web_socket_channel.
I don't think this package is not intended to expose the low level plumbing - for that use the WebSocket
directly. This package is wrapping an existing WebSocket
and exposing it as a StreamChannel
.
We do expose at least a little beyond the StreamChannel
interface, with things like closeCode
, but I'm not sure how much we'd want to expand that...
from web_socket_channel.
Related Issues (20)
- Calling add method with cascade operator invoke function only once
- ios 处于后台时,收不到消息。当切换为前台时,会立马推消息
- delayed HOT 1
- web_socket_channel 2.3.0 - IOWebSocketChannel.connect Doesn't Handle SocketException HOT 6
- Memory leaking when using isolates with channels HOT 4
- Breaking changes in 2.3.0 HOT 1
- Is there any way to upload Binary Message? HOT 1
- Crash
- op_close (8) is sending out about 20sec after channel.sink.close is called HOT 1
- How to set the ”Timeout“ parameter HOT 2
- It's currently not possible to retrieve the HTTP error/status code (like 404) when connecting to a WebSocket HOT 3
- GraphQLWebSocketChannel Missing Implementations
- The release mode closes the socket on iOS in the background
- Support for ws+unix:// schema for UNIX Domain Socket
- `ready` completes with exceptions and is therefore a breaking change HOT 2
- App crashes even when exceptions are handled HOT 4
- Error saving log: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"
- Error. When the server sends a message or receives a message, the connection is being disrupted.
- IOWebSocketChannel behaviour impaired after Android app sleep HOT 3
- WebSocketException: Connection to 'http://xxx.com:9999/chat#' was not upgraded to websocket HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web_socket_channel.