Files
stun/cmd/stun-multiplex/README.md
Sean DuBois 4ff55da887 Start pion/stun@v2
This is required to update pion/transport/v2 to v3

The public API of transport changed, and we expose transport as part of
our public API.
2023-09-05 11:17:47 -04:00

883 B

Multiplex

An example of doing UDP connection multiplexing that splits incoming UDP packets to two streams, "STUN Data" and "Application Data".

Usage:

$ go install github.com/pion/stun/v2/cmd/stun-multiplex@latest

On "server":

$ stun-multiplex
local addr: 0.0.0.0:34690 stun server addr: 64.233.161.127:19302
public addr: 123.131.100.200:34690
Acting as server. Use following command to connect:
stun-multiplex 123.131.100.200:34690

On "client":

$ stun-multiplex 123.131.100.200:34690
local addr: 0.0.0.0:37551 stun server addr: 66.102.1.127:19302
public addr: 159.69.13.15:37551
Acting as client. Connecting to 123.131.100.200:34690
Writing 123.131.100.200:34690
demultiplex: [123.131.100.200:34690]: Hello peer
Got response from 123.131.100.200:34690: Hello peer

On "server" you will see demultiplex: [159.69.13.15:37551]: Hello peer message.