moham96 / bittorrent_dht

Bittorrent DHT by Dart
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

network error: SocketException (SocketException: Send failed (OS Error: , errno = 10047 ) #2

Open mountain-ysh opened 7 months ago

mountain-ysh commented 7 months ago

Currently bittorrent_dht come with three router source. I'm trying add more source from source: /// Get trackers url list from some awsome website Stream<List> findPublicTrackers() { var f = <Future<List>>[]; f.add(_getTrackerFrom('https://newtrackon.com/api/stable')); f.add(_getTrackerFrom('https://trackerslist.com/all.txt')); f.add(_getTrackerFrom( 'https://cdn.jsdelivr.net/gh/ngosang/trackerslist/trackers_all.txt')); f.add(_getTrackerFrom('https://at.raxianch.moe/?type=AT-all')); return Stream.fromFutures(f); }

Then it throw out error: network error: SocketException (SocketException: Send failed (OS Error: , errno = 10047 )

I guess it related to port has been used, but could not figure out how to fix it. Here's code I can possibly track down: //krpc.dart _socket ??= await RawDatagramSocket.bind(InternetAddress.anyIPv4, port ?? 0);

moham96 commented 6 months ago

@mountain-ysh do you have reproducible code? note that if you are using this in a flutter app you need to give the app permission for network