Package-level declarations

Types

Link copied to clipboard
abstract class ApiStream

A class which can be used to handle events coming in over a streaming connection.

Link copied to clipboard
interface LimitedStream
Link copied to clipboard
interface Stream : LimitedStream
Link copied to clipboard
sealed interface StreamEvent

A single event associated with the stream between the client and this server.

Link copied to clipboard
class StreamId(val clientId: Short, val localStreamId: Short)

Represents a unique ID for a stream.

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun LimitedStream.broadcastExcluding(text: String, streamId: StreamId)
suspend fun LimitedStream.broadcastExcluding(text: String, streamIds: Iterable<StreamId>)

Convenience method to send a message to all clients that don't match any of the passed in IDs.

Link copied to clipboard
suspend fun LimitedStream.sendTo(text: String, streamId: StreamId)

suspend fun LimitedStream.sendTo(text: String, streamIds: Iterable<StreamId>)

Convenience method to send a message to all clients with matching IDs.