import { SdkSignalFrame } from '../signalingprotocol/SignalingProtocol.js' ; import SignalingClient from './SignalingClient' ; import SignalingClientEventType from './SignalingClientEventType' ; export default class SignalingClientEvent { timestampMs : number ; param client param type param message constructor ( public client , public type , public message , public closeCode ? , public closeReason ? ) { this . timestampMs = Date . now ( ) ; } isConnectionTerminated ( ) { switch ( this . type ) { case SignalingClientEventType . WebSocketFailed : case SignalingClientEventType . WebSocketError : case SignalingClientEventType . WebSocketClosing : case SignalingClientEventType . WebSocketClosed : return true ; default : return false ; } } }