Class WebSocketSession
java.lang.Object
com.linecorp.armeria.client.websocket.WebSocketSession
A WebSocket session that is created after
WebSocketClient.connect(String)
succeeds.
You can start sending WebSocketFrame
s via setOutbound(Publisher)
. You can also subscribe to
inbound()
to receive WebSocketFrame
s from the server.-
Method Summary
Modifier and TypeMethodDescriptioncontext()
Returns theClientRequestContext
.inbound()
Returns theWebSocket
that is used to receive WebSocket frames from the server.outbound()
Returns theWebSocketWriter
that is used to send WebSocket frames to the server.Returns theResponseHeaders
.void
setOutbound
(org.reactivestreams.Publisher<? extends WebSocketFrame> outbound) Sets theWebSocket
that is used to send WebSocket frames to the server.Returns the subprotocol negotiated between the client and the server.toString()
-
Method Details
-
context
Returns theClientRequestContext
. -
responseHeaders
Returns theResponseHeaders
. -
subprotocol
Returns the subprotocol negotiated between the client and the server. -
inbound
Returns theWebSocket
that is used to receive WebSocket frames from the server. -
outbound
Returns theWebSocketWriter
that is used to send WebSocket frames to the server.- Throws:
IllegalStateException
- if this method orsetOutbound(Publisher)
has been called already.
-
setOutbound
Sets theWebSocket
that is used to send WebSocket frames to the server.- Throws:
IllegalStateException
- if this method oroutbound()
has been called already.
-
toString
-