Create a new socket connection using Socket.connect() . Send data over the socket using the Socket write() method.
import 'dart:io'; main() async { var socket = await Socket.connect('127.0.0.1', 4041); print(socket.runtimeType); socket.write('Hello, World!'); }
查看更多关于使用 ServerSocket 构建网络客户端的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did129466