Search in sources :

Example 1 with TCPMetrics

use of io.vertx.core.spi.metrics.TCPMetrics in project vert.x by eclipse.

the class ConnectionBase method handleClosed.

protected void handleClosed() {
    closed = true;
    NetworkMetrics metrics = metrics();
    if (metrics != null) {
        flushBytesRead();
        flushBytesWritten();
        if (metrics instanceof TCPMetrics) {
            ((TCPMetrics) metrics).disconnected(metric(), remoteAddress());
        }
    }
    closePromise.setSuccess();
}
Also used : TCPMetrics(io.vertx.core.spi.metrics.TCPMetrics) NetworkMetrics(io.vertx.core.spi.metrics.NetworkMetrics)

Aggregations

NetworkMetrics (io.vertx.core.spi.metrics.NetworkMetrics)1 TCPMetrics (io.vertx.core.spi.metrics.TCPMetrics)1