public class WebSocketConnectionImpl extends Object implements WebSocketConnection
Modifier and Type | Field and Description |
---|---|
static byte[] |
empty |
static byte |
OPCODE_BINARY |
static byte |
OPCODE_CLOSE |
static byte |
OPCODE_CONT |
static byte |
OPCODE_PING |
static byte |
OPCODE_PONG |
static byte |
OPCODE_TEXT |
Constructor and Description |
---|
WebSocketConnectionImpl(NioWriter writer,
byte[] maskingBytes,
org.jetlang.fibers.NioFiber readFiber) |
Modifier and Type | Method and Description |
---|---|
void |
add(org.jetlang.core.Disposable disposable) |
void |
close()
Attempts to close the underlying socket.
|
void |
dispose() |
void |
execute(Runnable command) |
SocketAddress |
getRemoteAddress() |
boolean |
remove(org.jetlang.core.Disposable disposable) |
org.jetlang.core.Disposable |
schedule(Runnable runnable,
long l,
TimeUnit timeUnit) |
org.jetlang.core.Disposable |
scheduleAtFixedRate(Runnable runnable,
long initialDelay,
long delay,
TimeUnit timeUnit) |
org.jetlang.core.Disposable |
scheduleWithFixedDelay(Runnable runnable,
long initialDelay,
long delay,
TimeUnit timeUnit) |
SendResult |
send(String msg)
Non-Blocking send of a text message.
|
SendResult |
sendBinary(byte[] buffer,
int offset,
int length)
Non-Blocking send of a binary message.
|
SendResult |
sendPing(byte[] bytes,
int offset,
int length)
Non-Blocking send
|
SendResult |
sendPong(byte[] bytes,
int offset,
int length)
Non-Blocking send
|
int |
size() |
public static final byte OPCODE_CONT
public static final byte OPCODE_TEXT
public static final byte OPCODE_BINARY
public static final byte OPCODE_CLOSE
public static final byte OPCODE_PING
public static final byte OPCODE_PONG
public static final byte[] empty
public WebSocketConnectionImpl(NioWriter writer, byte[] maskingBytes, org.jetlang.fibers.NioFiber readFiber)
public SocketAddress getRemoteAddress()
getRemoteAddress
in interface WebSocketConnection
public SendResult send(String msg)
WebSocketConnection
send
in interface WebSocketConnection
public SendResult sendPong(byte[] bytes, int offset, int length)
WebSocketConnection
sendPong
in interface WebSocketConnection
public SendResult sendPing(byte[] bytes, int offset, int length)
WebSocketConnection
sendPing
in interface WebSocketConnection
public SendResult sendBinary(byte[] buffer, int offset, int length)
WebSocketConnection
sendBinary
in interface WebSocketConnection
public void close()
WebSocketConnection
close
in interface WebSocketConnection
public org.jetlang.core.Disposable schedule(Runnable runnable, long l, TimeUnit timeUnit)
schedule
in interface org.jetlang.core.Scheduler
public org.jetlang.core.Disposable scheduleWithFixedDelay(Runnable runnable, long initialDelay, long delay, TimeUnit timeUnit)
scheduleWithFixedDelay
in interface org.jetlang.core.Scheduler
public org.jetlang.core.Disposable scheduleAtFixedRate(Runnable runnable, long initialDelay, long delay, TimeUnit timeUnit)
scheduleAtFixedRate
in interface org.jetlang.core.Scheduler
public void add(org.jetlang.core.Disposable disposable)
add
in interface org.jetlang.core.DisposingExecutor
public boolean remove(org.jetlang.core.Disposable disposable)
remove
in interface org.jetlang.core.DisposingExecutor
public int size()
size
in interface org.jetlang.core.DisposingExecutor
public void dispose()
dispose
in interface org.jetlang.core.Disposable
Copyright © 2016. All Rights Reserved.