publish method
Publish data to channel
Implementation
@override
Future<void> publish(String channel, dynamic data) async {
if (!_isConnected) {
throw StateError('WebSocket not connected');
}
// Production: _channel?.sink.add(jsonEncode({'channel': channel, 'data': data}));
if (kDebugMode) {
debugPrint('Published to channel $channel: $data');
}
}