peek method
Returns the next message without removing it. Returns null if the queue is empty.
Implementation
WebSocketMessage? peek() {
if (_queue.isEmpty) {
return null;
}
return _queue.first;
}
Returns the next message without removing it. Returns null if the queue is empty.
WebSocketMessage? peek() {
if (_queue.isEmpty) {
return null;
}
return _queue.first;
}