mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 12:29:31 +00:00
Issue #3106 - changes from review, adding javadoc
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
45b2c548b0
commit
97ff7ed9c0
@ -62,6 +62,8 @@ public class Parser
|
||||
private static final Logger LOG = Log.getLogger(Parser.class);
|
||||
private final WebSocketPolicy policy;
|
||||
private final ByteBufferPool bufferPool;
|
||||
|
||||
// Stats (where a message is defined as a WebSocket frame)
|
||||
private final LongAdder messagesIn = new LongAdder();
|
||||
private final LongAdder bytesIn = new LongAdder();
|
||||
|
||||
|
@ -675,24 +675,36 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp
|
||||
setInitialBuffer(prefilled);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of WebSocket frames received over this connection
|
||||
*/
|
||||
@Override
|
||||
public long getMessagesIn()
|
||||
{
|
||||
return parser.getMessagesIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of WebSocket frames sent over this connection
|
||||
*/
|
||||
@Override
|
||||
public long getMessagesOut()
|
||||
{
|
||||
return flusher.getMessagesOut();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of bytes received over this connection
|
||||
*/
|
||||
@Override
|
||||
public long getBytesIn()
|
||||
{
|
||||
return parser.getBytesIn();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the number of bytes frames sent over this connection
|
||||
*/
|
||||
@Override
|
||||
public long getBytesOut()
|
||||
{
|
||||
|
@ -53,8 +53,11 @@ public class FrameFlusher extends IteratingCallback
|
||||
private final Deque<FrameEntry> queue = new ArrayDeque<>();
|
||||
private final List<FrameEntry> entries;
|
||||
private final List<ByteBuffer> buffers;
|
||||
|
||||
// Stats (where a message is defined as a WebSocket frame)
|
||||
private final LongAdder messagesOut = new LongAdder();
|
||||
private final LongAdder bytesOut = new LongAdder();
|
||||
|
||||
private boolean closed;
|
||||
private boolean canEnqueue = true;
|
||||
private Throwable terminated;
|
||||
|
Loading…
x
Reference in New Issue
Block a user