The RTCDataChannel.close() method closes the closure of the channel.
RTCDataChannel.close()
MDN Reference