好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

使用 ServerSocket 构建网络客户端

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 构建网络客户端的详细内容...

  阅读:68次