P2PStreamAdapter constructor
P2PStreamAdapter(
- MuxedStream _underlyingMuxedStream,
- TCPConnection _parentConnection,
- StreamManagementScope _streamManagementScope,
- Direction _direction,
- String _protocolId,
Implementation
P2PStreamAdapter(
this._underlyingMuxedStream,
this._parentConnection,
this._streamManagementScope,
this._direction, // Added direction
this._protocolId,
) : _id = Uuid().v4() { // Initialize unique ID
_incomingDataController = StreamController<Uint8List>(
onListen: _startListening,
onCancel: _stopListening,
);
}