import { NativeModules } from 'react-native';

const { MyTcpSocket } = NativeModules;

interface MyTcpSocketInterface {
    writeToSocket(ip: string, port: number, data: string[]): Promise<string>;
}

export const myTcpSocket: MyTcpSocketInterface = {
    writeToSocket: async (ip: string, port: number, data: string[]): Promise<string> => {
        return await MyTcpSocket.writeToSocket(ip, port, data);
    },
};