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 datastreams that do not need an owner (like synchronising the transform of a game object and so on ...).
Clone this repository with the following command
git clone https://github.com/TLabAltoh/rust-server-for-multiplayer.git
cd REPOSITORY_ROOT
build-*.bat
cd REPOSITORY_ROOT
run.bat
This 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.mp4
cd REPOSITORY_ROOT
run.bat
start chrome http://localhost:7777 --auto-open-devtools-for-tabs
cd REPOSITORY_ROOT
run.bat
start firefox http://localhost:7777 -devtools
Also, 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 !).