socket_io_client_new 1.0.0
socket_io_client_new: ^1.0.0 copied to clipboard
A fixed fork of socket_io_client that resolves the port 0 issue. When Dart's Uri.parse() parses URLs without explicit ports, it returns port=0, causing WebSocket connections to fail. This package prop [...]
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2025-01-02 #
Fixed #
- Critical: Fixed port 0 issue where WebSocket connections failed when connecting to URLs without explicit ports
- When Dart's
Uri.parse()parses URLs likehttps://api.example.com, it returnsport = 0instead of the protocol's default port - The original package used this port directly, resulting in invalid URLs like
wss://api.example.com:0/socket.io/ - This fix detects when port is 0 and sets the correct default port (443 for HTTPS/WSS, 80 for HTTP/WS)
- When Dart's
Notes #
- Initial release (forked from socket_io_client)
- API remains fully compatible with
socket_io_client- just change the import - Minimum Dart SDK version: 3.0.0