Problem
Currently, the Colyseus Unity SDK handles the websocket data using its own tightly coupled connection layer. In larger projects, we often already have a standardized WebSocket implementation used across the entire application. Because the SDK's transport layer cannot be easily overridden, we are forced to maintain multiple distinct networking implementations within the same project. This lack of consistency across the transportation layer causes confusion, makes debugging harder, and adds unnecessary overhead.
Solution
I would like the connection/transport layer to be decoupled into a customizable module or interface (e.g., IWebSocketTransport or IConnection).
The SDK should still provide the current implementation as the default out-of-the-box solution, but it should expose a way for developers to inject a custom transport layer when initializing the Colyseus Client.
For example:
var myCustomTransport = new MyProjectWebSocketImplementation();
var client = new Colyseus.Client("ws://localhost:2567", myCustomTransport);
Problem
Currently, the Colyseus Unity SDK handles the websocket data using its own tightly coupled connection layer. In larger projects, we often already have a standardized WebSocket implementation used across the entire application. Because the SDK's transport layer cannot be easily overridden, we are forced to maintain multiple distinct networking implementations within the same project. This lack of consistency across the transportation layer causes confusion, makes debugging harder, and adds unnecessary overhead.
Solution
I would like the connection/transport layer to be decoupled into a customizable module or interface (e.g.,
IWebSocketTransportorIConnection).The SDK should still provide the current implementation as the default out-of-the-box solution, but it should expose a way for developers to inject a custom transport layer when initializing the Colyseus Client.
For example: