This is an SFU (Selectable Forwarding Unit) server for relaying WebRTC and WebSocket packets. Intended for use in a realtime multiplayer game. This repository's webrtc implementation is mostly based on binbat's live777 and webrtc-rs.
Warning
I am not a member or contributor of original source. Please note that my modification may have dropped original source's critical features.
-
Broadcast -
Unicast (by user id) -
Multicast
-
DataChannel -
Audio -
Video -
Trickle-ICE -
Vanilla-ICE (No plans at the moment.)
-
Binary -
Text (No plans at the moment.)
-
OnOpen -
OnClose
In this repository, you can use whep without whip in WebRTC. When whep is called without whip, the server prepares the dummy whip. it assumes use cases for data streams that do not need an owner (like synchronising the transform of a gameobject and so on ...).
Clone this repository with the following command
git clone https://github.com/TLabAltoh/rust-server-for-multiplayer.gitcd REPOSITORY_ROOT
build-*.batcd REPOSITORY_ROOT
run-*.batThis repository contains a browser-based debugging tool. Prepare the media (mp3 and mp4) of your choice and Run the command below to open it.
cd REPOSITORY_ROOT
mkdir assets\webui\media
@rem put the media (please set the name to sample-audio.mp3 and sample-video.mp4) of your choice.
@rem ls
@rem sample-audio.mp3 sample-video.mp4cd REPOSITORY_ROOT
run-debug.bat
start chrome http://localhost:7777 --auto-open-devtools-for-tabscd REPOSITORY_ROOT
run-debug.bat
start firefox http://localhost:7777 -devtoolsAlso, client implementation sample with javascript has been puted in ./assets/webui/ and used as part of debug-tool's module. Currently, it only has the function of just (join / exit) Room and (send / receive) MediaStream / DataChannel / WebSocket. This repository only contains javascript client implementation examples. The C# version of the Unity client implementation example is maintained in a separate repository (unity's sample is here !).
