platform/example/socket.dart
2019-04-29 01:55:02 -04:00

10 lines
220 B
Dart

import 'package:angel_wings/angel_wings.dart';
main() async {
var socket = await WingsSocket.bind('127.0.0.1', 3000);
await for (var fd in socket) {
print('FD: $fd');
closeNativeSocketDescriptor(fd);
}
}