@Override
    default HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {
        final WebSocketUpgradeResult upgradeResult = protocolHandler().upgrade(ctx, req);
        if (!upgradeResult.isSuccess()) {
            return upgradeResult.fallbackResponse();
        }

        final WebSocket in = protocolHandler().decode(ctx, req);
        final WebSocket out = serve(ctx, in);
        return protocolHandler().encode(ctx, out);
    }
Returns a new {@link WebSocketServiceBuilder} with the {@link WebSocketServiceHandler}.
core/src/main/java/com/linecorp/armeria/server/websocket/WebSocketService.java