Peer constructor

Peer({
  1. String? id,
  2. String host = '0.peerjs.com',
  3. int port = 443,
  4. String path = '/',
  5. bool secure = true,
  6. String key = 'peerjs',
  7. IceConfiguration? config,
})

Implementation

Peer({
  String? id,
  String host = '0.peerjs.com',
  int port = 443,
  String path = '/',
  bool secure = true,
  String key = 'peerjs',
  IceConfiguration? config,
}) : _adapter = kIsWeb ? WebWebRtcAdapter() : MobileWebRtcAdapter(),
     _config = config,
     _signaling = SignalingClient(
       host: host,
       port: port,
       path: path,
       secure: secure,
       key: key,
     ) {
  _setupSignaling(id);
}