send method
Implementation
@override
Future<void> send(dynamic data) {
if (_connectionState != ConnectionState.connected) {
return Future.error(
Exception(
'Cannot send data if the connection is not in '
'the \'Connected\' State.',
),
);
}
_sendQueue ??= TransportSendQueue(transport: _transport);
// Transport will not be null if state is connected
return _sendQueue!.send(data);
}