Reputation: 10604
My problem is simple: I need to get HttpServerRequest
of connection that triggered websocket handler in VertX? Websocket handler provides me just ServerWebSocket
and I don't see how I can get the underlying HttpServerRequest
?
Upvotes: 0
Views: 369
Reputation: 36
public void hadle(ServerWebSocket serverWebSocket) {
MultiMap headers = serverWebSocket.headers();
}
This should do it.
Upvotes: 2
Reputation: 13
I don't really see what you are trying to do.
Eighter you're trying to establish a http-connection, then you're using the HttpServerRequest or you're using a websocket connection, then you can write to the socket directly using the write methode.
So I guess you're mixing up two things and should decide if you want to use http connection with request/response or websocket with read/write.
Upvotes: 0