public class WebSocketWriter
Class that processes written WebSocketWriter.getOutgoing Websocket class Frame,
serializes them and writes the bits into the writeChannel.
WebSocketWriter.getOutgoing,
class Frame| Constructor and Description |
|---|
WebSocketWriter(kotlinx.coroutines.io.ByteWriteChannel writeChannel,
NonExistentClass coroutineContext,
boolean masking,
kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> pool)
Class that processes written
WebSocketWriter.getOutgoing Websocket class Frame,
serializes them and writes the bits into the writeChannel. |
WebSocketWriter(kotlinx.coroutines.io.ByteWriteChannel writeChannel,
kotlinx.coroutines.Job parent,
NonExistentClass coroutineContext,
boolean masking,
kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> pool)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the message queue
|
java.lang.Object |
flush(kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Ensures all enqueued messages has been written
|
NonExistentClass |
getCoroutineContext() |
boolean |
getMasking()
Whether it will mask serialized frames.
|
kotlinx.coroutines.channels.SendChannel<io.ktor.http.cio.websocket.Frame> |
getOutgoing()
Channel for sending Websocket's
class Frame that will be serialized and written to writeChannel. |
kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> |
getPool()
ByteBuffer pool to be used by this writer
|
java.lang.Object |
send(Frame frame,
kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Send a frame and write it and all outstanding frames in the queue
|
void |
setMasking(boolean p)
Whether it will mask serialized frames.
|
public WebSocketWriter(kotlinx.coroutines.io.ByteWriteChannel writeChannel,
NonExistentClass coroutineContext,
boolean masking,
kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> pool)
Class that processes written WebSocketWriter.getOutgoing Websocket class Frame,
serializes them and writes the bits into the writeChannel.
masking - Whether it will mask serialized frames.pool - ByteBuffer pool to be used by this writerWebSocketWriter.getOutgoing,
class Framepublic WebSocketWriter(kotlinx.coroutines.io.ByteWriteChannel writeChannel,
kotlinx.coroutines.Job parent,
NonExistentClass coroutineContext,
boolean masking,
kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> pool)
public kotlinx.coroutines.channels.SendChannel<io.ktor.http.cio.websocket.Frame> getOutgoing()
Channel for sending Websocket's class Frame that will be serialized and written to writeChannel.
class Framepublic java.lang.Object send(Frame frame, kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Send a frame and write it and all outstanding frames in the queue
public java.lang.Object flush(kotlin.coroutines.experimental.Continuation<? super kotlin.Unit> p)
Ensures all enqueued messages has been written
public void close()
Closes the message queue
public NonExistentClass getCoroutineContext()
public boolean getMasking()
Whether it will mask serialized frames.
public void setMasking(boolean p)
Whether it will mask serialized frames.
p - Whether it will mask serialized frames.public kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> getPool()
ByteBuffer pool to be used by this writer