UNPKG

rn-wifi-p2p

Version:

React Native module for Android P2P communication using Wi-Fi Direct.

33 lines (32 loc) 847 B
"use strict"; import NativeRnWifiP2P from '../NativeRnWifiP2P'; import { WifiP2PError } from "../errors/index.js"; export const createGroup = async () => { try { return await NativeRnWifiP2P.createGroup(); } catch (error) { throw WifiP2PError.fromNativeError(error); } }; export const removeGroup = async () => { try { return await NativeRnWifiP2P.removeGroup(); } catch (error) { throw WifiP2PError.fromNativeError(error); } }; export const getConnectionInfo = async () => { try { return await NativeRnWifiP2P.getConnectionInfo(); } catch (error) { throw WifiP2PError.fromNativeError(error); } }; export const getGroupInfo = async () => { try { return await NativeRnWifiP2P.getGroupInfo(); } catch (error) { throw WifiP2PError.fromNativeError(error); } }; //# sourceMappingURL=group.js.map