public interface WebSocket
| Modifier and Type | Method and Description |
|---|---|
WebSocket |
addWebSocketListener(WebSocketListener l)
Add a
WebSocketListener |
java.net.SocketAddress |
getLocalAddress()
Get local address client initiated request from.
|
java.net.SocketAddress |
getRemoteAddress()
Get remote address client initiated request to.
|
io.netty.handler.codec.http.HttpHeaders |
getUpgradeHeaders() |
boolean |
isOpen() |
WebSocket |
removeWebSocketListener(WebSocketListener l)
Remove a
WebSocketListener |
io.netty.util.concurrent.Future<java.lang.Void> |
sendBinaryFrame(byte[] payload)
Send a full binary frame.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendBinaryFrame(byte[] payload,
boolean finalFragment,
int rsv)
Allows sending a binary frame with fragmentation or extension bits.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendBinaryFrame(io.netty.buffer.ByteBuf payload,
boolean finalFragment,
int rsv)
Allows sending a binary frame with fragmentation or extension bits.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendCloseFrame()
Send a empty close frame.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendCloseFrame(int statusCode,
java.lang.String reasonText)
Send a empty close frame.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendContinuationFrame(byte[] payload,
boolean finalFragment,
int rsv)
Send a binary continuation frame.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendContinuationFrame(io.netty.buffer.ByteBuf payload,
boolean finalFragment,
int rsv)
Send a continuation frame (those are actually untyped as counterpart must have memorized first fragmented frame type).
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendContinuationFrame(java.lang.String payload,
boolean finalFragment,
int rsv)
Send a text continuation frame.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendPingFrame()
Send a empty ping frame
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendPingFrame(byte[] payload)
Send a ping frame with a byte array payload (limited to 125 bytes or less).
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendPingFrame(io.netty.buffer.ByteBuf payload)
Send a ping frame with a ByteBuf payload (limited to 125 bytes or less).
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendPongFrame()
Send a empty pong frame
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendPongFrame(byte[] payload)
Send a pong frame with a byte array payload (limited to 125 bytes or less).
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendPongFrame(io.netty.buffer.ByteBuf payload)
Send a pong frame with a ByteBuf payload (limited to 125 bytes or less).
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendTextFrame(io.netty.buffer.ByteBuf payload,
boolean finalFragment,
int rsv)
Allows sending a text frame with fragmentation or extension bits.
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendTextFrame(java.lang.String payload)
Send a full text frame
|
io.netty.util.concurrent.Future<java.lang.Void> |
sendTextFrame(java.lang.String payload,
boolean finalFragment,
int rsv)
Allows sending a text frame with fragmentation or extension bits.
|
io.netty.handler.codec.http.HttpHeaders getUpgradeHeaders()
java.net.SocketAddress getRemoteAddress()
null if asynchronous provider is unable to provide the remote addressjava.net.SocketAddress getLocalAddress()
null if asynchronous provider is unable to provide the local addressio.netty.util.concurrent.Future<java.lang.Void> sendTextFrame(java.lang.String payload)
payload - a text payloadio.netty.util.concurrent.Future<java.lang.Void> sendTextFrame(java.lang.String payload,
boolean finalFragment,
int rsv)
payload - a text fragment.finalFragment - flag indicating whether or not this is the final fragmentrsv - extension bits, 0 otherwiseio.netty.util.concurrent.Future<java.lang.Void> sendTextFrame(io.netty.buffer.ByteBuf payload,
boolean finalFragment,
int rsv)
payload - a ByteBuf fragment.finalFragment - flag indicating whether or not this is the final fragmentrsv - extension bits, 0 otherwiseio.netty.util.concurrent.Future<java.lang.Void> sendBinaryFrame(byte[] payload)
payload - a binary payloadio.netty.util.concurrent.Future<java.lang.Void> sendBinaryFrame(byte[] payload,
boolean finalFragment,
int rsv)
payload - a binary payloadfinalFragment - flag indicating whether or not this is the last fragmentrsv - extension bits, 0 otherwiseio.netty.util.concurrent.Future<java.lang.Void> sendBinaryFrame(io.netty.buffer.ByteBuf payload,
boolean finalFragment,
int rsv)
payload - a ByteBuf payloadfinalFragment - flag indicating whether or not this is the last fragmentrsv - extension bits, 0 otherwiseio.netty.util.concurrent.Future<java.lang.Void> sendContinuationFrame(java.lang.String payload,
boolean finalFragment,
int rsv)
payload - the text fragmentfinalFragment - flag indicating whether or not this is the last fragmentrsv - extension bits, 0 otherwiseio.netty.util.concurrent.Future<java.lang.Void> sendContinuationFrame(byte[] payload,
boolean finalFragment,
int rsv)
payload - the binary fragmentfinalFragment - flag indicating whether or not this is the last fragmentrsv - extension bits, 0 otherwiseio.netty.util.concurrent.Future<java.lang.Void> sendContinuationFrame(io.netty.buffer.ByteBuf payload,
boolean finalFragment,
int rsv)
payload - a ByteBuf fragmentfinalFragment - flag indicating whether or not this is the last fragmentrsv - extension bits, 0 otherwiseio.netty.util.concurrent.Future<java.lang.Void> sendPingFrame()
io.netty.util.concurrent.Future<java.lang.Void> sendPingFrame(byte[] payload)
payload - the payload.io.netty.util.concurrent.Future<java.lang.Void> sendPingFrame(io.netty.buffer.ByteBuf payload)
payload - the payload.io.netty.util.concurrent.Future<java.lang.Void> sendPongFrame()
io.netty.util.concurrent.Future<java.lang.Void> sendPongFrame(byte[] payload)
payload - the payload.io.netty.util.concurrent.Future<java.lang.Void> sendPongFrame(io.netty.buffer.ByteBuf payload)
payload - the payload.io.netty.util.concurrent.Future<java.lang.Void> sendCloseFrame()
io.netty.util.concurrent.Future<java.lang.Void> sendCloseFrame(int statusCode,
java.lang.String reasonText)
statusCode - a status codereasonText - a reasonboolean isOpen()
true if the WebSocket is open/connected.WebSocket addWebSocketListener(WebSocketListener l)
WebSocketListenerl - a WebSocketListenerWebSocket removeWebSocketListener(WebSocketListener l)
WebSocketListenerl - a WebSocketListenerCopyright © 2019. All Rights Reserved.