GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - MirageNet/MultiplexSocketFactory

BranchesTags
Open more actions menu

Latest commit

 

History

15 Commits
15 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Assets
Assets
 
 
Packages
Packages
 
 
ProjectSettings
ProjectSettings
 
 
UserSettings
UserSettings
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.releaserc.yml
.releaserc.yml
 
 
.vsconfig
.vsconfig
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Documentation Discord release openupm

Plugin for Mirage.

Multiplex allows a server to run multiple sockets at once, this allows clients from multiple platforms to connect to the same game server.

Installation

openUPM

  1. Add openupm registry. Click on the menu Edit -> Project settings..., and add a scoped registry like so:
    Name: OpenUPM
    Url: https://package.openupm.com
    Scopes:
    • com.miragenet
  2. Close the project settings
  3. Open the package manager.
  4. Click on menu Window -> Package Manager and select "Packages: My Registries",
  5. select the latest version of MultiplexSocket and click install, like so:
  6. You may come back to the package manager to unistall MultiplexSocket or upgrade it.

Usage

  1. On the GameObject that contains your NetworkManager component, add the MultiplexSocketFactory component.
  2. Add other SocketFactory components that you want to use to the same or other GameObjects. For example, UdpSocketFactory and SteamSocketFactory.
  3. In the Inspector for MultiplexSocketFactory, expand the Factories list.
  4. Drag and drop your other SocketFactory components (e.g., UdpSocketFactory) into the list elements. The order of this list is important for clients.
  5. Finally, assign the MultiplexSocketFactory component to the Socket Factory field on your NetworkServer and NetworkClient components.

How it Works

The MultiplexSocketFactory behaves differently depending on whether it is running on a server or a client.

Server

When a server is started, the MultiplexSocketFactory iterates through the entire Factories list and creates a server socket for each one. This allows the server to listen for connections on multiple transports at the same time. For example, a single server can accept connections from local LAN players using UDP and from Steam friends using Steam's transport layer simultaneously.

Client

When a client starts, the MultiplexSocketFactory iterates through the Factories list in order and uses the first one that is supported on the current platform (IsSupported property returns true). This creates a fallback system. For example, if you place a Steam transport first in the list and a UDP transport second:

  • If the client has Steam running, it will use the Steam transport to connect.
  • If Steam is not running or not supported, the factory will fall back and try to use the UDP transport instead.

About

No description, website, or topics provided.

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.