Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .gitignore

This file was deleted.

110 changes: 68 additions & 42 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,68 @@
## 1.0.1

**Bug Fix:**

* [#45](https://github.com/rikulo/socket.io-dart/issues/45) [BUG] Calling close on Server raises ConcurrentModificationError

**New Feature:**

* [#47](https://github.com/rikulo/socket.io-dart/pull/47) Added Future to start and stop server

## 1.0.0

**New Feature:**

* [#33](https://github.com/rikulo/socket.io-dart/issues/33) Null safety


## 0.9.4

**Bug Fix:**

* [#23](https://github.com/rikulo/socket.io-dart/issues/23) [BUG] Calling close on Server raises ConcurrentModificationError

## 0.9.3

**Bug Fix:**

* [#18](https://github.com/rikulo/socket.io-dart/pull/18) make sure it is accessing the rooms map


## 0.9.2

**Bug Fix:**

* [#17](https://github.com/rikulo/socket.io-dart/pull/17) inference error


## 0.9.1+1

**New Feature:**

* [#16](https://github.com/rikulo/socket.io-dart/pull/16) Apply Pedantic recommendations
# Changelog

All notable changes to this fork are documented here.
This fork tracks upstream [`rikulo/socket.io-dart`](https://github.com/rikulo/socket.io-dart)
and adds the fixes listed below. Once these are accepted upstream the
`dependency_override` in consuming projects can be removed.

---

## 2.0.1 – 2026-05-03

### Fixed

- **Polling transport – packet splitting** (`lib/src/engine/transport/polling_transport.dart`)
`onData()` previously called `PacketParser.decodePayload()` which cannot
parse Engine.IO v4 / Socket.IO v3+ payloads. Replaced with a custom
`_splitPackets()` splitter that locates packet boundaries on `]`, `}` or
`"` followed by a digit, then decodes each packet individually via
`PacketParser.decodePacket()`. This makes polling fully equivalent to the
WebSocket transport for all current Socket.IO clients (JS, browser, Dart).
- **Polling transport – connection close race** (`doWrite / respond`)
`respond()` was synchronous and used `unawaited(connect!.close())`, causing
premature or failed connection closes that produced *xhr poll error* on
clients. `respond` is now `async` and `await`s `connect!.close()`.
- **Polling transport – CORS headers**
Added `Access-Control-Allow-Origin`, `Access-Control-Allow-Credentials`,
`Access-Control-Allow-Methods`, and cache-control headers to every polling
response so browser and cross-origin Dart clients do not get blocked.
- **Namespace – typed connection handler**
`onConnection()` now casts the raw `dynamic` listener argument to `Socket`
before invoking the typed `EventHandler<Socket>` callback.

### Added

- `example/polling_smoke.dart` – raw Engine.IO v4 polling smoke test that
can be run against a live server to verify the polling fix end-to-end.
- `--with-polling-smoke` flag in `tool/check.sh`.

---

## 2.0.0 – 2025-10-11

### Changed (breaking – Dart 3 migration)

- Minimum SDK raised to `>=3.0.0 <4.0.0`.
- Dart 3 modernisation: sealed classes, records, exhaustive switches, and
improved null-safety throughout.
- Package renamed from `tp_socket_io` to `socket_io`; all import paths
updated (`package:socket_io/socket_io.dart`).

### Added

- **Typed API** – value objects (`ConnectionId`, `RoomName`, `EventName`,
`NamespaceName`, `PortNumber`, …) and sealed domain models
(`SocketIOPacket`, `SocketIOError`, `TransportData`, …) alongside the
legacy untyped API for gradual migration.
- **Expanded test suite** – 773 tests across 34 files covering every value
object, model, extension, and error type.
- `doc/ARCHITECTURE.md`, `doc/TYPE_SAFE_EXAMPLES.md`,
`doc/TYPE_SAFETY_MIGRATION_GUIDE.md`, `doc/QUICK_REFERENCE.md`.

---

## 1.0.1 – upstream baseline

Upstream release from [`rikulo/socket.io-dart`](https://github.com/rikulo/socket.io-dart).
See [upstream CHANGELOG](https://github.com/rikulo/socket.io-dart/blob/master/CHANGELOG.md)
for history prior to this fork.
Loading