public interface IWebSocketSession extends IStreamSession
IStreamSession
interface to cover the Web Socket functionalities.Modifier and Type | Method and Description |
---|---|
void |
close(int status)
Writes the Web Socket close frame with given status code and then gently
closes this session.
|
void |
close(int status,
String reason)
Writes the Web Socket close frame with given status code and reason and then
gently closes this session.
|
IHandshaker |
getHandshaker()
Returns the Web Socket handshaker associated with this session.
|
IWebSocketHandler |
getWebSocketHandler()
Returns the Web Socket handler associated with this session
|
getHandler, getParent, getPipeline, write, write, write, write, write, write, writenf, writenf, writenf, writenf, writenf, writenf
allocate, close, dirtyClose, execute, executenf, getAttributes, getCloseFuture, getCodecPipeline, getConfig, getCreateFuture, getCreationTime, getEndFuture, getId, getLastIoTime, getLastReadTime, getLastWriteTime, getLocalAddress, getName, getOpenFuture, getReadBytes, getReadBytesThroughput, getReadyFuture, getRemoteAddress, getState, getTimer, getWrittenBytes, getWrittenBytesThroughput, isDataCopyingOptimized, isOpen, isReadSuspended, isWriteSuspended, quickClose, release, resumeRead, resumeWrite, suspendRead, suspendWrite
IWebSocketHandler getWebSocketHandler()
IHandshaker getHandshaker()
void close(int status)
status
- the status code of the close frame, or -1 if the close frame
should not contain the application body.void close(int status, String reason)
status
- the status code of the close frame, or -1 if the close frame
should not contain the application body.reason
- the reason of the close frame. If the status
argument
equals -1 this argument is ignored.Copyright © 2017–2022 SNF4J.ORG. All rights reserved.