private boolean exiting = false;
private int counter;
+ private long bytesReceived;
+ private long bytesSent;
+
private TraceHandler tracer = new TraceHandler();
/**
return port;
}
+ /**
+ * The total amount of bytes received.
+ *
+ * @return the amount of bytes received
+ */
+ public long getBytesReceived() {
+ return bytesReceived;
+ }
+
+ /**
+ * The total amount of bytes sent.
+ *
+ * @return the amount of bytes sent
+ */
+ public long getBytesSent() {
+ return bytesSent;
+ }
+
/**
* Start the server (listen on the network for new connections).
* <p>
}
ciphers += cipher;
}
- tracer.trace("Available SSL ciphers: " + ciphers);
while (started && !exiting) {
count(1);
new Thread(new Runnable() {
@Override
public void run() {
+ ConnectActionServer action = null;
try {
- createConnectActionServer(s).connect();
+ action = createConnectActionServer(s);
+ action.connect();
} finally {
count(-1);
+ if (action != null) {
+ bytesReceived += action.getBytesReceived();
+ bytesSent += action.getBytesSent();
+ }
}
}
}).start();