close method

Future<void> close()

Implementation

Future<void> close() async {
  if (_peerConnection == null) {
    throw 'Init must be called first!';
  }
  await _peerConnection.close();

  if (_dataChannel != null) {
    await _dataChannel?.close();
  }
}