Skip to content

Commit

Permalink
Merge pull request #188 from EpicGamesExt/master
Browse files Browse the repository at this point in the history
Bring 5.5 up to date with master
  • Loading branch information
lukehb authored Jul 11, 2024
2 parents 2caf044 + f327db3 commit 737d2cf
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 256 deletions.
2 changes: 1 addition & 1 deletion Signalling/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@epicgames-ps/lib-pixelstreamingsignalling-ue5.5",
"version": "1.0.3",
"version": "2.0.0",
"description": "Basic signalling library for developers wishing to build applications that signal a Pixel Streaming application.",
"main": "build/commonjs/pixelstreamingsignalling.js",
"module": "build/esm/pixelstreamingsignalling.js",
Expand Down
133 changes: 0 additions & 133 deletions Signalling/src/MatchmakerConnection.ts

This file was deleted.

36 changes: 0 additions & 36 deletions Signalling/src/SignallingServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { SFUConnection } from './SFUConnection';
import { Logger } from './Logger';
import { StreamerRegistry } from './StreamerRegistry';
import { PlayerRegistry } from './PlayerRegistry';
import { IMatchmakerConfig, MatchmakerConnection } from './MatchmakerConnection';
import { Messages, MessageHelpers, SignallingProtocol } from '@epicgames-ps/lib-pixelstreamingcommon-ue5.5';
import { stringify } from './Utils';

Expand Down Expand Up @@ -43,27 +42,6 @@ export interface IServerConfig {

// Additional websocket options for the SFU listening websocket.
sfuWsOptions?: WebSocket.ServerOptions;

// Enables the matchmaker connection.
useMatchmaker?: boolean;

// The ip/hostname of the matchmaker application.
matchmakerAddress?: string;

// The port that the matchmaker is listening for connections on.
matchmakerPort?: number;

// Number of seconds to delay before a reconnection attempt when the matchmaker connection is lost.
matchmakerRetryInterval?: number;

// Number of seconds between keep alive pings to the matchmaker.
matchmakerKeepAliveInterval?: number;

// Sent to the matchmaker so it can tell clients the ip/hostname to connect to
publicIp?: string;

// Sent to the matchmaker so it can tell clients what port to connect to
publicPort?: number;
}

type ProtocolConfig = {
Expand Down Expand Up @@ -126,20 +104,6 @@ export class SignallingServer {
sfuServer.on('connection', this.onSFUConnected.bind(this));
Logger.info(`Listening for SFU connections on port ${config.sfuPort}`);
}

// Optional Matchmaker connections
if (config.useMatchmaker) {
const mmConfig: IMatchmakerConfig = {
publicIp: config.publicIp!,
publicPort: config.publicPort!,
address: config.matchmakerAddress!,
port: config.matchmakerPort!,
https: config.httpsServer != undefined,
retryInterval: config.matchmakerRetryInterval!,
keepAliveInterval: config.matchmakerKeepAliveInterval!,
};
const _matchmakerConnection = new MatchmakerConnection(mmConfig, this.streamerRegistry, this.playerRegistry);
}
}

private onStreamerConnected(ws: WebSocket, request: http.IncomingMessage) {
Expand Down
10 changes: 1 addition & 9 deletions SignallingWebServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,6 @@ Options:
--rest_api Enables the rest API interface that can be accessed at
<server_url>/api/api-definition (default: false)
--peer_options <json-string> Additional JSON data to send in peerConnectionOptions of the config message.
--matchmaker Enable matchmaker connection. (default: false)
--matchmaker_address <address> Sets the matchmaker address to connect to. (default: "127.0.0.1")
--matchmaker_port <port> Sets the matchmaker port to connect to. (default: "9999")
--matchmaker_retry <seconds> Sets the delay before reconnecting to the matchmaker after a disconnect. (default:
"5")
--matchmaker_keepalive <seconds> Sets the delay between matchmaker pings. (default: "30")
--public_ip <ip address> The public IP address to be used to connect to this server. Only needed when using
matchmaker. (default: "127.0.0.1")
--log_config Will print the program configuration on startup. (default: false)
--stdin Allows stdin input while running. (default: false)
--no_config Skips the reading of the config file. Only CLI options will be used. (default:
Expand Down Expand Up @@ -89,7 +81,7 @@ These CLI options can also be described in a `config.json` (default config file
```
Given these options, to start the server with the closest behaviour as the old cirrus, you would invoke,
```
npm start -- --console_messages verbose --serve --log_config --http_root Public --homepage player.html
npm start -- --console_messages --https_redirect verbose --serve --log_config --http_root Public --homepage player.html
```
Note that `Public` being used as the http root assumes your Frontend is in that directory from the old behaviour of the scripts. The new convenience scripts (`platform_scripts` directory) will now build the frontend into the `www` directory.

Expand Down
9 changes: 4 additions & 5 deletions SignallingWebServer/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@epicgames-ps/wilbur",
"version": "1.0.4",
"version": "2.0.0",
"description": "A basic signalling server application for Unreal Engine's Pixel Streaming applications.",
"main": "index.js",
"scripts": {
"build": "tsc",
"build-dev": "npm link ../Signalling && npm run build",
"build-all": "rimraf ./build && cd ../Signalling && npm run build-all && cd ../SignallingWebServer && npm run build-dev",
"start": "node ./build/index.js --serve --console_messages verbose --log_config",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"build-all": "rimraf ./build && npm link ../Signalling && cd ../Signalling && npm run build-all && cd ../SignallingWebServer && npm run build-dev",
"start": "node ./build/index.js --serve --console_messages verbose --log_config --https_redirect",
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Epic Games",
Expand All @@ -28,7 +28,6 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@epicgames-ps/lib-pixelstreamingsignalling-ue5.5": "^1.0.3",
"commander": "^12.0.0",
"express": "^4.18.2",
"express-openapi": "^12.1.3",
Expand Down
Loading

0 comments on commit 737d2cf

Please sign in to comment.