sm_websocket 0.0.5
sm_websocket: ^0.0.5 copied to clipboard

Flutter Android iOS Linux macOS web Windows

WebSocket client for Dart.

websocket #

WebSocket client for Dart.

Getting Started #

import 'package:sm_websocket/sm_websocket.dart';

IWebSocket ws = WebSocket();

ws.onSuccess(() {
print("连接成功");
});

ws.onFail(() {
print("连接失败");
});

ws.onMessage((data) {
print(data);
});

ws.onClose(() {
print("断开连接");
});

ws.open("ws://127.0.0.1:6656/ws");