0.2.7 • Published 11 months ago

react-native-websocket-ssl-pinning v0.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

react-native-websocket-ssl-pinning

Creates a secure WebSocket connection using ssl-pinning technique.

THIS PROJECT IS STILL IN DEVELOPMENT STAGE

Installation

yarn add react-native-websocket-ssl-pinning

Usage

Create the connection

import { fetch } from 'react-native-websocket-ssl-pinning';

try{
  const response = await fetch(`wss://${serverip}/`, {
	method: 'GET',
	timeoutInterval: 10000, // Request timeout
	sslPinning: {
	  certs: ['rootCA_public'],
	},
  });
  
  if (response.code === 101) {
	console.log(
	  'Switching protocols. Starting secure web socket connection...',
	);

	socketOpen()
  }
} catch(e) {
  console.error(e);
}

TODO: finish usage

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.2.7

11 months ago

0.2.6

11 months ago

0.2.5

11 months ago

0.2.3

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago