rn-wifi-p2p
Version:
React Native module for Android P2P communication using Wi-Fi Direct.
33 lines (32 loc) • 812 B
JavaScript
import NativeRnWifiP2P from '../NativeRnWifiP2P';
import { WifiP2PError } from "../errors/index.js";
export const initialize = async () => {
try {
return await NativeRnWifiP2P.init();
} catch (error) {
throw WifiP2PError.fromNativeError(error);
}
};
export const stop = async () => {
try {
return await NativeRnWifiP2P.stop();
} catch (error) {
throw WifiP2PError.fromNativeError(error);
}
};
export const getConfig = async () => {
try {
return await NativeRnWifiP2P.getConfig();
} catch (error) {
throw WifiP2PError.fromNativeError(error);
}
};
export const setConfig = async config => {
try {
return await NativeRnWifiP2P.setConfig(config);
} catch (error) {
throw WifiP2PError.fromNativeError(error);
}
};
//# sourceMappingURL=core.js.map
;