# UdpStreamClient

class UdpStreamClient(udpClient: UdpClient, streamClientListener: StreamClientListener?) : StreamBaseClient

Created by pedro on 6/3/24.

## Constructors

UdpStreamClient
Link copied to clipboard
constructor(udpClient: UdpClient, streamClientListener: StreamClientListener?)

## Functions

clearCache
Link copied to clipboard
open override fun clearCache()
getBitrateExponentialFactor
Link copied to clipboard
open override fun getBitrateExponentialFactor(): Float

Get the exponential factor used to calculate the bitrate. Default 1f

getBytesSend
Link copied to clipboard
open override fun getBytesSend(): Long
getCacheSize
Link copied to clipboard
open override fun getCacheSize(): Int
getDroppedAudioFrames
Link copied to clipboard
open override fun getDroppedAudioFrames(): Long
getDroppedVideoFrames
Link copied to clipboard
open override fun getDroppedVideoFrames(): Long
getItemsInCache
Link copied to clipboard
open override fun getItemsInCache(): Int
getSentAudioFrames
Link copied to clipboard
open override fun getSentAudioFrames(): Long
getSentVideoFrames
Link copied to clipboard
open override fun getSentVideoFrames(): Long
hasCongestion
Link copied to clipboard
fun hasCongestion(): Boolean
open override fun hasCongestion(percentUsed: Float): Boolean
resetBytesSend
Link copied to clipboard
open override fun resetBytesSend()
resetDroppedAudioFrames
Link copied to clipboard
open override fun resetDroppedAudioFrames()
resetDroppedVideoFrames
Link copied to clipboard
open override fun resetDroppedVideoFrames()
resetSentAudioFrames
Link copied to clipboard
open override fun resetSentAudioFrames()
resetSentVideoFrames
Link copied to clipboard
open override fun resetSentVideoFrames()
resizeCache
Link copied to clipboard
open override fun resizeCache(newSize: Int)
reTry
Link copied to clipboard
fun reTry(delay: Long, reason: String): Boolean
open override fun reTry(delay: Long, reason: String, backupUrl: String?): Boolean

Retries to connect with the given delay. You can pass an optional backupUrl if you'd like to connect to your backup server instead of the original one. Given backupUrl replaces the original one.

setAuthorization
Link copied to clipboard
open override fun setAuthorization(user: String?, password: String?)
setBitrateExponentialFactor
Link copied to clipboard
open override fun setBitrateExponentialFactor(factor: Float)
setCheckServerAlive
Link copied to clipboard
open override fun setCheckServerAlive(enabled: Boolean)
setDelay
Link copied to clipboard
open override fun setDelay(millis: Long)

Set stream delay in millis. This will create a cache and wait the delay to start send packets in real time

setLogs
Link copied to clipboard
open override fun setLogs(enabled: Boolean)
setOnlyAudio
Link copied to clipboard
open override fun setOnlyAudio(onlyAudio: Boolean)
setOnlyVideo
Link copied to clipboard
open override fun setOnlyVideo(onlyVideo: Boolean)
setReTries
Link copied to clipboard
open override fun setReTries(reTries: Int)
setSocketTimeout
Link copied to clipboard
open override fun setSocketTimeout(timeout: Long)

Set timeout ms for connection, write and read in sockets by default 5000ms

setSocketType
Link copied to clipboard
open override fun setSocketType(type: SocketType)

Set if you want use java.io or ktor socket