public final class WebSocketSession extends Object
| Constructor and Description |
|---|
WebSocketSession(WebSocketConfig config,
InputStream inputStream,
OutputStream outputStream,
SocketAddress remoteAddress,
SocketAddress localAddress,
List<WebSocketExtension> extensions) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(int statusCode,
String reason) |
void |
close(WebSocketCloseStatus status) |
void |
closeQuietly() |
static String |
decodeText(ByteBuffer payload) |
SocketAddress |
getLocalAddress() |
SocketAddress |
getRemoteAddress() |
WebSocketFrame |
readFrame() |
void |
sendBinary(ByteBuffer data) |
void |
sendPing(ByteBuffer data) |
void |
sendPong(ByteBuffer data) |
void |
sendText(String text) |
public WebSocketSession(WebSocketConfig config, InputStream inputStream, OutputStream outputStream, SocketAddress remoteAddress, SocketAddress localAddress, List<WebSocketExtension> extensions)
public SocketAddress getRemoteAddress()
public SocketAddress getLocalAddress()
public WebSocketFrame readFrame() throws IOException
IOExceptionpublic void sendText(String text) throws IOException, WebSocketException
IOExceptionWebSocketExceptionpublic void sendBinary(ByteBuffer data) throws IOException, WebSocketException
IOExceptionWebSocketExceptionpublic void sendPing(ByteBuffer data) throws IOException
IOExceptionpublic void sendPong(ByteBuffer data) throws IOException
IOExceptionpublic void close(int statusCode,
String reason)
throws IOException
IOExceptionpublic void close(WebSocketCloseStatus status) throws IOException
IOExceptionpublic void closeQuietly()
public static String decodeText(ByteBuffer payload) throws WebSocketException
WebSocketExceptionCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.