Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gaukas/transportc
A pluggable transport implemented with WebRTC data channels, written in Go.
https://github.com/gaukas/transportc
data-channels webrtc
Last synced: about 1 month ago
JSON representation
A pluggable transport implemented with WebRTC data channels, written in Go.
- Host: GitHub
- URL: https://github.com/gaukas/transportc
- Owner: gaukas
- License: mit
- Created: 2021-07-21T19:12:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-27T09:08:22.000Z (almost 2 years ago)
- Last Synced: 2023-07-12T13:15:32.292Z (over 1 year ago)
- Topics: data-channels, webrtc
- Language: Go
- Homepage:
- Size: 136 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TranspoRTC
A ready-to-go pluggable transport utilizing WebRTC datachannel written in Go.
## Design
### Config
A `Config` defines the behavior of the transport. A `Config` could be used to configure:
- Automatic signalling when establishing the PeerConnection
- IP addresses to be used for ICE candidates
- Port range for ICE candidates
- UDP Mux for serving multiple connections over one UDP socket### Dialer
A `Dialer` is created from a `Config` and is used to dial one or more `Conn` backed by WebRTC DataChannel.
On its first call to `Dial`, the `Dialer` will create a new PeerConnection and DataChannel. On subsequent calls, the `Dialer` will reuse the existing PeerConnection and DataChannel.
### Listener
A `Listener` is created from a `Config` and is used to listen for incoming `Conn` backed by WebRTC DataChannel. It looks for incoming SDP offers to establish new PeerConnections and also looks for incoming DataChannels on existing PeerConnections.
One `Listener` can maintain multiple `PeerConnection`s and on each `PeerConnection` multiple `DataChannel`s may co-exist.
A `Listener` requires a valid `SignalMethod` to function.
### Conn
A `Conn` is created from a `Dialer` and is used to send and receive messages. Each `Conn` is backed by a single WebRTC DataChannel.