public void handleUpgrade(StreamConnection connection, HttpServerExchange serverExchange) {
WebSocketChannel channel = handshake.createChannel(exchange, connection, exchange.getBufferPool());
if (peerConnections != null) {
peerConnections.add(channel);
}
endpointSessionHandler.onConnect(exchange, channel);
}
});
handshake.handshake(exchange);
}