Package org. jellyfin. sdk. api. sockets
Types
Link copied to clipboard
class OkHttpWebsocketSession( clientOptions: HttpClientOptions, incomingMessageChannel: Channel<String>, context: CoroutineContext) : SocketInstanceConnection
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Reusable WebSocket connection. Constructed using SocketConnectionFactory.
Link copied to clipboard
Possible states for a SocketInstance.
Functions
Link copied to clipboard
inline fun SocketInstance.addGeneralCommandsListener( commands: Set<<ERROR CLASS>> = GeneralCommandType.values().toSet(), stopOnCredentialsChange: Boolean = false, listener: SocketMessageReceiver<<ERROR CLASS>>): SocketListener
Content copied to clipboard
Add a listener that listens to certain GeneralCommandType entries in the GeneralCommandMessage.
Link copied to clipboard
inline fun SocketInstance.addGlobalListener(stopOnCredentialsChange: Boolean = false, listener: SocketMessageReceiver<<ERROR CLASS>>): SocketListener
Content copied to clipboard
Add a listener that listens to all message types. If you want to listen for specific messages you can use addListener or addGeneralCommandsListener instead.
Link copied to clipboard
inline fun <T> SocketInstance.addListener(stopOnCredentialsChange: Boolean = false, listener: SocketMessageReceiver<T>): SocketListener
Content copied to clipboard
Add a listener that listens to a specific message type.
Link copied to clipboard
inline fun SocketInstance.addPlayStateCommandsListener( commands: Set<<ERROR CLASS>> = PlaystateCommand.values().toSet(), stopOnCredentialsChange: Boolean = false, listener: SocketMessageReceiver<<ERROR CLASS>>): SocketListener
Content copied to clipboard
Add a listener that listens to certain PlaystateCommand entries in the PlayStateMessage.
Link copied to clipboard
inline fun SocketInstance.addSyncPlayCommandsListener( commands: Set<<ERROR CLASS>> = SendCommandType.values().toSet(), stopOnCredentialsChange: Boolean = false, listener: SocketMessageReceiver<<ERROR CLASS>>): SocketListener
Content copied to clipboard
Add a listener that listens to certain SendCommandType entries in the SyncPlayCommandMessage.