Last updated:
0 purchases
future soket
reads the specified number of bytes from a TCP socket
for client
import 'dart:io';
import 'package:future_soket/future_soket.dart';
void main(List<String> arguments) async {
final soket = FutureSoket();
await soket.connect(InternetAddress("127.0.0.1"), 8855, Duration(seconds: 1));
final buf1 = await soket.read(9);
final buf2 = await soket.read(8);
}
copied to clipboard
for server:
import 'dart:io';
import 'package:future_soket/future_soket.dart';
void main(List<String> arguments) async {
final server = await ServerSocket.bind("127.0.0.1", 7777);
await for (var soket in server) {
final fSoket = FutureSoket.fromSoket(soket);
final buf1 = await fSoket.read(55);
}
}
copied to clipboard
future_soket #
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.