working poc
This commit is contained in:
29
frontend-web-vanilla/src/interfaces/ISignalingClient.ts
Normal file
29
frontend-web-vanilla/src/interfaces/ISignalingClient.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import type { IMessage } from '../messaging/IMessage';
|
||||
import { MessageKind } from '../messaging/MessageKind';
|
||||
|
||||
/**
|
||||
* Interface for signaling client operations
|
||||
* Follows Interface Segregation Principle - focused interface for signaling
|
||||
*/
|
||||
export interface ISignalingClient {
|
||||
/**
|
||||
* Register a callback for a specific message type
|
||||
*/
|
||||
on<T>(kind: MessageKind, callback: (message: IMessage<T>) => Promise<void>): void;
|
||||
|
||||
/**
|
||||
* Send an offer to the signaling server
|
||||
*/
|
||||
sendOffer(offer: RTCSessionDescriptionInit): Promise<void>;
|
||||
|
||||
/**
|
||||
* Send an answer to the signaling server
|
||||
*/
|
||||
sendAnswer(answer: RTCSessionDescriptionInit): Promise<void>;
|
||||
|
||||
/**
|
||||
* Send an ICE candidate to the signaling server
|
||||
*/
|
||||
sendCandidate(candidate: RTCIceCandidateInit): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user