github.com/pion/webrtc/v3@v3.2.24/examples/ice-single-port/README.md (about) 1 # ice-single-port 2 ice-single-port demonstrates Pion WebRTC's ability to serve many PeerConnections on a single port. 3 4 Pion WebRTC has no global state, so by default ports can't be shared between two PeerConnections. 5 Using the SettingEngine, a developer can manually share state between many PeerConnections to allow 6 multiple PeerConnections to use the same port. 7 8 ## Instructions 9 10 ### Download ice-single-port 11 This example requires you to clone the repo since it is serving static HTML. 12 13 ``` 14 mkdir -p $GOPATH/src/github.com/pion 15 cd $GOPATH/src/github.com/pion 16 git clone https://github.com/pion/webrtc.git 17 cd webrtc/examples/ice-single-port 18 ``` 19 20 ### Run ice-single-port 21 Execute `go run *.go` 22 23 ### Open the Web UI 24 Open [http://localhost:8080](http://localhost:8080). This will automatically open 10 PeerConnections. This page will print 25 a Local/Remote line for each PeerConnection. Note that all 10 PeerConnections have different ports for their Local port. 26 However for the remote they all will be using port 8443. 27 28 Congrats, you have used Pion WebRTC! Now start building something cool.