mirror of
https://github.com/openflocon/Flocon.git
synced 2026-05-19 20:52:15 +00:00
Feat network websocket (#306)
Co-authored-by: Florent Champigny <florent@bere.al>
This commit is contained in:
parent
47a2236eec
commit
33016a2f32
4 changed files with 21 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package io.github.openflocon.flocon.plugins.network
|
||||
|
||||
import io.github.openflocon.flocon.FloconApp
|
||||
import io.github.openflocon.flocon.core.FloconPlugin
|
||||
import io.github.openflocon.flocon.plugins.network.model.BadQualityConfig
|
||||
import io.github.openflocon.flocon.plugins.network.model.FloconNetworkCallRequest
|
||||
|
|
@ -7,7 +8,9 @@ import io.github.openflocon.flocon.plugins.network.model.FloconNetworkCallRespon
|
|||
import io.github.openflocon.flocon.plugins.network.model.FloconWebSocketEvent
|
||||
import io.github.openflocon.flocon.plugins.network.model.MockNetworkResponse
|
||||
|
||||
|
||||
fun floconLogWebSocketEvent(event: FloconWebSocketEvent) {
|
||||
FloconApp.instance?.client?.networkPlugin?.logWebSocket(event)
|
||||
}
|
||||
|
||||
interface FloconNetworkPlugin : FloconPlugin {
|
||||
val mocks: Collection<MockNetworkResponse>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ package io.github.openflocon.flocon.plugins.network.model
|
|||
|
||||
class FloconWebSocketEvent(
|
||||
val websocketUrl: String,
|
||||
val timeStamp: Long,
|
||||
val event: Event,
|
||||
val size: Long,
|
||||
val size: Long = 0L,
|
||||
val message: String? = null,
|
||||
val error: Throwable? = null,
|
||||
val timeStamp: Long = System.currentTimeMillis(),
|
||||
) {
|
||||
enum class Event {
|
||||
Closed,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue