Make a WebSocket connection using WebSocket.connect() , and send data over that connection using the WebSocket add() method.
import 'dart:io'; main() async { var socket = await WebSocket.connect('ws://127.0.0.1:4040/ws'); socket.add('Hello, World!'); }
查看更多关于快速构建WebSocket客户端的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did129467