websocket_universal 0.0.2-dev websocket_universal: ^0.0.2-dev copied to clipboard
Convenient websocket handler for all platforms (both IO and web/HTML). Websocket messages routing, statuses and other features have easy-to-use interface.
websocket_universal #
Easy-to-use interface: #
- Only
connect()
anddisconnect()
methods to use websocket handler! - Send message to server using [sendMessage(Y messageToServer)] and
listen messages coming from server using
incomingMessagesStream
- Listen to websocket states
socketStateStream
or all events that are happeninglogEventStream
. Define how you process your messages to and from server and ping/pong interaction usingIMessageProcessor<Tin,Yout>
generic interface or use convinientSocketMessageProcessor
implementation (see example).
void main() {
}