freeport 1.0.1
freeport: ^1.0.1 copied to clipboard
Fast and reliable Dart library for finding available network ports with parallel checking and custom hostname support.
1.0.1 #
- Fix handling of invalid port 0 in free port selection
- Optimize preferred port selection to return first available
1.0.0 #
- Remove unnecessary await from ServerSocket.bind call
- Ensure socket is closed after getting port number
- Optimize preferred port selection logic
- Handle port 0 and simplify address resolution in freeport
0.0.2 #
Bug Fixes #
- Fixed resource leak in
isAvailablePort
function by properly closing the Socket after port testing #2 - Improved port testing logic to ensure network resources are released after checks
Improvements #
- Implemented parallel port checking in
freePort
function for significant performance improvement when testing multiple preferred ports - Added two-stage port checking strategy with fallback mechanism for better reliability
- Refactored the implementation of
isAvailablePort
function with better Future handling - Enhanced handling of port 0 logic
Credits #
- Thanks to @FourLeafTec for submitting PR #2, fixing the Socket resource leak issue
0.0.1 #
- Initial version.