import type { TurboModule } from "react-native" import { TurboModuleRegistry } from "react-native" export interface Spec extends TurboModule { createServer( id: string, port: number, discoveryGroup: string | null, discoveryName: string | null, ): Promise stopServer(id: string, reason: string): Promise send(serverId: string, connectionId: string, message: string): Promise closeConnection(serverId: string, connectionId: string, reason: string): Promise getConnectionIds(serverId: string): Promise getLocalIpAddress(): Promise addListener(eventType: string): void removeListeners(count: number): void } export default TurboModuleRegistry.getEnforcing("TCPServerModule")