package
0.0.0-20241221123402-d1b4610d0d15
Repository: https://github.com/backkem/go-lp2p.git
Documentation: pkg.go.dev

# README

Example data-channel

This example demonstrates the LP2PDataChannel API for exchanging messages.

The example simulates both peers. It is configured to run in a non-interactive way, simulating user input.

Example output

The presenting browser (receiver) show a pin:
Pin: 1234 (presented to user)
The consuming browser (requester) asks the user to enter the pin.
Pin: 1234 (entered by user)
Requester: got connection
Requester: got dataChannel
Receiver: got connection
Receiver: Received message: Good day to you, receiver!
Requester: Received message: Good day to you, requester!