assertEquals(sent, received);
testComplete();
}
if (startTLS && !upgradedClient.get()) {
assertFalse(socket.isSsl());
socket.upgradeToSsl(v -> {
assertTrue(socket.isSsl());
// Now send the rest
for (int i = 1; i < numChunks; i++) {
sendBuffer(socket, sent, chunkSize);
}