Ramble-FE / config / signalingConfig.ts
signalingConfig.ts
Raw
import Constants from 'expo-constants';

export interface SignalingConfig {
    serverUrl: string;
    reconnectDelay?: number;
    heartbeatIncoming?: number;
    heartbeatOutgoing?: number;
    connectionTimeout?: number;
    maxRetries?: number;
}

export const SIGNALING_CONFIG: Required<SignalingConfig> = {
    serverUrl: `${Constants.expoConfig?.extra?.apiBaseUrl}/ws`,
    reconnectDelay: 5000,
    heartbeatIncoming: 4000,
    heartbeatOutgoing: 2000,
    connectionTimeout: 10000,
    maxRetries: 3,
} as const;