Demonstration of using Pion WebRTC with a shared socket

pion-webrtc-shared-socket

This example demonstrates how Pion WebRTC can use an already listening UDP socket. On startup we listen on UDP Socket 8000. We wrap this socket in a sharedUDPConn, this sharedUDPConn drops ReadFrom that don't appear to be WebRTC traffic.

Running

  • go install github.com/sean-der/pion-webrtc-shared-socket@latest
  • ~/go/bin/pion-webrtc-shared-socket
  • Open http://localhost:8080

In the command line you should see

2021/10/26 14:42:29 Open http://localhost:8080 to access
Peer Connection State has changed: connected

This means that the PeerConnection has started and connected succesfully. Now attempt to send non-WebRTC traffic to the process.

  • echo 'Testing' | nc -q 1 -u localhost 800

This will be printed in the terminal like so

Dropped packet that doesn't appear to be WebRTC: Testing
Similar Resources

Native macOS networking for QEMU using vmnet.framework and socket networking.

qemu-vmnet Native macOS networking for QEMU using vmnet.framework and socket networking. Getting started TODO -netdev socket,id=net0,udp=:1234,localad

Jan 5, 2023

A Socket Framework Built Using Golang

A Socket Framework Built Using Golang

Jan 20, 2022

Code to be shared between EduVPN clients

EduVPN shared library This repository contains a Go library with functions that all EduVPN clients can use. The goal is to let EduVPN clients link aga

Mar 15, 2022

Socketlogger allows multiple processes to log to a shared log file between processes.

Socketlogger allows multiple processes to log to a shared log file between processes.

socketlogger socketlogger is a language agnostic logging utility designed to allow mulitple applications, running on one or multiple computers, to wri

Dec 7, 2021

Turbine-common - This package contains the common interfaces for Turbine that are shared with other software

turbine-common This package contains the common interfaces for Turbine that are

Feb 12, 2022

A wrapper for exposing a shared endpoint for Google Cloud Functions in go. API styled after Node.JS firebase-functions package.

firebase-fx A wrapper for Google Cloud Functions that simplifies the deployment of serverless applications. Meant to expose a similar API to the Fireb

Nov 7, 2022

Pure Go implementation of the WebRTC API

Pure Go implementation of the WebRTC API

Pion WebRTC A pure Go implementation of the WebRTC API New Release Pion WebRTC v3.0.0 has been released! See the release notes to learn about new feat

Jan 1, 2023

Pure Go implementation of the WebRTC API

Pure Go implementation of the WebRTC API

Pure Go implementation of the WebRTC API

Jan 8, 2023

gRPC over WebRTC

gRPC over WebRTC Just a proof of concept, please be kind. How to Start all the things Client, create-react-app + grpc-web signaling + webrtc extension

Dec 16, 2022
A yet to be voice call application in terminal. with the power of go and webRTC (pion).

Kenny I'm just trying to make a cli operated voice call chat application using go with help of webRTC and PortAudio. It might stay a Work In Progress

Dec 2, 2022
This project is the eloboration of pion/webrtc.

This project is the eloboration of pion/webrtc. The idea is to make the (pion/webrtc) sfu-ws example be able to handle multiple rooms

Nov 29, 2021
A simple WebRTC Signaling server for flutter-webrtc and html5
A simple WebRTC Signaling server for flutter-webrtc and html5

flutter-webrtc-server A simple WebRTC Signaling server for flutter-webrtc and html5. Online Demo: https://demo.cloudwebrtc.com:8086/ Features Support

Dec 13, 2021
Glue - Robust Go and Javascript Socket Library (Alternative to Socket.io)

Glue - Robust Go and Javascript Socket Library Glue is a real-time bidirectional socket library. It is a clean, robust and efficient alternative to so

Nov 25, 2022
GOWS is GoLang web-socket module Provides you with ease of handling web socket connections with a few lines

GOWS GOWS is GoLang web-socket module Provides you with ease of handling web socket connections with a few lines, it supports multi-connection on one

Apr 4, 2022
Simple Relay between a Unix socket and a TCP socket, and vice versa.
Simple Relay between a Unix socket and a TCP socket, and vice versa.

Simple TCP <-> Unix Relay simpletcpunixrelay is a program which exposes a TCP endpoint as a Unix socket and vice versa. Usecase Let's say you are runn

Nov 23, 2022
Playing with go, gobot & pion
Playing with go, gobot & pion

Tello-WebRTC-FPV Lately there were a couple of articles about pion and it looked very cool, but I didn't know what I could do with it. I then remember

Nov 21, 2022
Kick dropper is a very simple and leightweight demonstration of SQL querying, and injection by parsing URl's

__ __ __ __ _____ ______ | |/ |__|.----.| |--.______| \.----.| |.-----.-----.-----.----.

Feb 6, 2022
A toy MMO example built using Ebiten and WebRTC DataChannels (UDP)
A toy MMO example built using Ebiten and WebRTC DataChannels (UDP)

Ebiten WebRTC Toy MMO ⚠️ This is a piece of incomplete hobby work and not robust. Please read the "Why does this project exist?" section. What is this

Aug 28, 2022
A TCP socket based chat server implemented using Go

Go Chat Server A better TCP socket chat server implemented using Go Connecting nc localhost 5000 Docker Build the container image docker build -t grub

Oct 16, 2021