Working with vert.x core 3.2.1, I saw this configuration of a server using a web socket:
vertx.createHttpServer().websocketHandler(ws -> ws.handler(ws::writeBinaryMessage)).requestHandler(req -> { if (req.uri().equals("/")) req.response().sendFile("ws.html"); }).listen(8080); By recording, I realized that on the vertex platform we are creating an http server which, using the listen method, listening to port 8080, is waiting for a possible connection to it. It also uses a web-based handler, which is associated with the request-handler. But there is no clear understanding of what is happening in websocketHandler. Lambda expressions and :: - operator confused me. Please explain what executes this code, or if possible, write this construction without lambda.