This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #497 from mcottontensor/new_cirrus
Add new Common and signalling libs and rewrite Cirrus (now Wilbur) to use them
- Loading branch information
Showing
180 changed files
with
17,805 additions
and
10,961 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
dist | ||
build | ||
node_modules | ||
types | ||
package-lock.json | ||
package.json | ||
tsconfig.json | ||
.eslintrc.js | ||
.eslintrc.js | ||
src/Messages/signalling_messages.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
## lib-pixelstreamingcommon | ||
# lib-pixelstreamingcommon | ||
|
||
The common library for the browser/client side of Pixel Streaming experiences. This library exposes common functionality for frontend applications of the pixel streaming ecosystem. | ||
|
||
See [lib-pixelstreamingfrontend](/Frontend/library) for an example of how to implement this library. | ||
For examples of how to implement this library. | ||
- See [lib-pixelstreamingfrontend](/Frontend/library) | ||
- See [lib-pixelstreamingsignalling](/Signalling) | ||
- Also see [Wilbur](/SignallingWebServer) which uses the signalling library to implement a full signalling server. | ||
|
||
Currently exposed. | ||
### Logger | ||
A small helper class for handling logging across the pixel streaming infrastructure. | ||
|
||
### ITransport | ||
An interface to a transport protocol that is in charge of sending and receiving signalling messages. Users can make use of supplied transport protocols or implement their own transport protocol via extending this interface. They can then pass the transport into the constructor of `SignallingProtocol` which is explained below. | ||
|
||
### WebSocketTransport | ||
An `ITransport` implementation that sends signalling messages over a websocket. This is currently the only transport in use by the official pixel streaming frontend. | ||
|
||
### SignallingProtocol | ||
This is the object where the user should send/receive messages. Currently there are specific functions for specific messages sent, but in the future this should change to be more generic. You can specify your own transport protocol by passing an implementation of `ITransport` to this class, allowing you to send and receive messages through any protocol you wish. | ||
|
||
### Adding it to your project | ||
`npm i @epicgames-ps/lib-pixelstreamingcommon-ue5.5` | ||
## Documentation | ||
The API is documented [here](docs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@epicgames-ps/lib-pixelstreamingcommon-ue5.5 | ||
|
||
# @epicgames-ps/lib-pixelstreamingcommon-ue5.5 | ||
|
||
## Table of contents | ||
|
||
### Modules | ||
|
||
- [Logger/Logger](modules/Logger_Logger.md) | ||
- [Messages/base\_message](modules/Messages_base_message.md) | ||
- [Messages/message\_helpers](modules/Messages_message_helpers.md) | ||
- [Messages/message\_registry](modules/Messages_message_registry.md) | ||
- [Protocol/SignallingProtocol](modules/Protocol_SignallingProtocol.md) | ||
- [Transport/ITransport](modules/Transport_ITransport.md) | ||
- [Transport/WebSocketTransport](modules/Transport_WebSocketTransport.md) | ||
- [Transport/WebSocketTransportNJS](modules/Transport_WebSocketTransportNJS.md) | ||
- [pixelstreamingcommon](modules/pixelstreamingcommon.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,206 @@ | ||
[@epicgames-ps/lib-pixelstreamingcommon-ue5.5](../README.md) / [Logger/Logger](../modules/Logger_Logger.md) / Logger | ||
|
||
# Class: Logger | ||
|
||
[Logger/Logger](../modules/Logger_Logger.md).Logger | ||
|
||
A basic console logger utilized by the Pixel Streaming frontend to allow | ||
logging to the browser console. | ||
|
||
## Table of contents | ||
|
||
### Constructors | ||
|
||
- [constructor](Logger_Logger.Logger.md#constructor) | ||
|
||
### Properties | ||
|
||
- [verboseLogLevel](Logger_Logger.Logger.md#verboseloglevel) | ||
|
||
### Methods | ||
|
||
- [CommonLog](Logger_Logger.Logger.md#commonlog) | ||
- [Error](Logger_Logger.Logger.md#error) | ||
- [GetStackTrace](Logger_Logger.Logger.md#getstacktrace) | ||
- [Info](Logger_Logger.Logger.md#info) | ||
- [Log](Logger_Logger.Logger.md#log) | ||
- [SetLoggerVerbosity](Logger_Logger.Logger.md#setloggerverbosity) | ||
- [Warning](Logger_Logger.Logger.md#warning) | ||
|
||
## Constructors | ||
|
||
### constructor | ||
|
||
• **new Logger**(): [`Logger`](Logger_Logger.Logger.md) | ||
|
||
#### Returns | ||
|
||
[`Logger`](Logger_Logger.Logger.md) | ||
|
||
## Properties | ||
|
||
### verboseLogLevel | ||
|
||
▪ `Static` **verboseLogLevel**: `number` = `5` | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:8](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L8) | ||
|
||
## Methods | ||
|
||
### CommonLog | ||
|
||
▸ **CommonLog**(`level`, `stack`, `message`): `void` | ||
|
||
The common log function that all other log functions call to. | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `level` | `string` | the level of this log message. | | ||
| `stack` | `string` | an optional stack trace string from where the log message was called. | | ||
| `message` | `string` | the message to be logged. | | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:87](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L87) | ||
|
||
___ | ||
|
||
### Error | ||
|
||
▸ **Error**(`stack`, `message`): `void` | ||
|
||
The standard logging output | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `stack` | `string` | the stack trace | | ||
| `message` | `string` | the message to be logged | | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:68](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L68) | ||
|
||
___ | ||
|
||
### GetStackTrace | ||
|
||
▸ **GetStackTrace**(): `string` | ||
|
||
Captures the stack and returns it | ||
|
||
#### Returns | ||
|
||
`string` | ||
|
||
the current stack | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:14](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L14) | ||
|
||
___ | ||
|
||
### Info | ||
|
||
▸ **Info**(`stack`, `message`, `verbosity?`): `void` | ||
|
||
The standard logging output | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `stack` | `string` | the stack trace | | ||
| `message` | `string` | the message to be logged | | ||
| `verbosity?` | `number` | the verbosity level | | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:55](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L55) | ||
|
||
___ | ||
|
||
### Log | ||
|
||
▸ **Log**(`stack`, `message`, `verbosity?`): `void` | ||
|
||
The standard logging output | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `stack` | `string` | the stack trace | | ||
| `message` | `string` | the message to be logged | | ||
| `verbosity?` | `number` | the verbosity level | | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:41](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L41) | ||
|
||
___ | ||
|
||
### SetLoggerVerbosity | ||
|
||
▸ **SetLoggerVerbosity**(`verboseLogLevel`): `void` | ||
|
||
Set the log verbosity level | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `verboseLogLevel` | `number` | | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:29](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L29) | ||
|
||
___ | ||
|
||
### Warning | ||
|
||
▸ **Warning**(`stack`, `message`): `void` | ||
|
||
The standard logging output | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `stack` | `string` | the stack trace | | ||
| `message` | `string` | the message to be logged | | ||
|
||
#### Returns | ||
|
||
`void` | ||
|
||
#### Defined in | ||
|
||
[Logger/Logger.ts:77](https://github.com/mcottontensor/PixelStreamingInfrastructure/blob/1d8a258/Common/src/Logger/Logger.ts#L77) |
Oops, something went wrong.