socket_io_client_new 1.0.2 copy "socket_io_client_new: ^1.0.2" to clipboard
socket_io_client_new: ^1.0.2 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.2 - 2025-01-02 #

Changed #

  • Updated example file with generic event names for clarity

1.0.1 - 2025-01-02 #

Added #

  • Comprehensive example file with multiple usage patterns
  • Stream and StreamBuilder pattern example
  • Socket Service singleton pattern example
  • Advanced SocketIOService with multiple stream controllers

Changed #

  • Updated README with more detailed documentation
  • Added version compatibility table
  • Added allowEIO3 note for Socket.IO v2.x servers
  • Added socket cache handling documentation
  • Added troubleshooting section with GitHub issue references

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 like https://api.example.com, it returns port = 0 instead 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)

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
0
likes
140
points
741
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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 properly handles default ports.

Repository (GitHub)
View/report issues

Topics

#socket-io #websocket #realtime #networking

License

MIT (license)

Dependencies

logging, socket_io_common, web

More

Packages that depend on socket_io_client_new