Skip to content

Latest commit

 

History

History
177 lines (93 loc) · 5.39 KB

File metadata and controls

177 lines (93 loc) · 5.39 KB

@epicgames-ps/lib-pixelstreamingsignalling-ue5.5


@epicgames-ps/lib-pixelstreamingsignalling-ue5.5 / PlayerConnection / PlayerConnection

Class: PlayerConnection

Defined in: Signalling/src/PlayerConnection.ts:27

A connection between the signalling server and a player connection. This is where messages expected to be handled by the player come in and where messages are sent to the player.

Interesting internals: playerId: The unique id string of this player. transport: The ITransport where transport events can be subscribed to protocol: The SignallingProtocol where signalling messages can be subscribed to.

Implements

Constructors

new PlayerConnection()

new PlayerConnection(server, ws, remoteAddress?): PlayerConnection

Defined in: Signalling/src/PlayerConnection.ts:50

Initializes a new connection with given and sane values. Adds listeners for the websocket close and error so it can react by unsubscribing and resetting itself.

Parameters

server

SignallingServer

The signalling server object that spawned this player.

ws

WebSocket

The websocket coupled to this player connection.

remoteAddress?

string

The remote address of this connection. Only used as display.

Returns

PlayerConnection

Properties

playerId

playerId: string

Defined in: Signalling/src/PlayerConnection.ts:29

Implementation of

IPlayer.playerId


protocol

protocol: SignallingProtocol

Defined in: Signalling/src/PlayerConnection.ts:33

Implementation of

IPlayer.protocol


remoteAddress?

optional remoteAddress: string

Defined in: Signalling/src/PlayerConnection.ts:37


subscribedStreamer

subscribedStreamer: null | IStreamer

Defined in: Signalling/src/PlayerConnection.ts:35

Implementation of

IPlayer.subscribedStreamer


transport

transport: ITransport

Defined in: Signalling/src/PlayerConnection.ts:31

Methods

getPlayerInfo()

getPlayerInfo(): IPlayerInfo

Defined in: Signalling/src/PlayerConnection.ts:88

Returns a descriptive object for the REST API inspection operations.

Returns

IPlayerInfo

An IPlayerInfo object containing viewable information about this connection.

Implementation of

IPlayer.getPlayerInfo


getReadableIdentifier()

getReadableIdentifier(): string

Defined in: Signalling/src/PlayerConnection.ts:71

Returns an identifier that is displayed in logs.

Returns

string

A string describing this connection.

Implementation of

IMessageLogger.getReadableIdentifier


sendMessage()

sendMessage(message): void

Defined in: Signalling/src/PlayerConnection.ts:79

Sends a signalling message to the player.

Parameters

message

BaseMessage

The message to send.

Returns

void

Implementation of

IPlayer.sendMessage