@epicgames-ps/lib-pixelstreamingsignalling-ue5.5
@epicgames-ps/lib-pixelstreamingsignalling-ue5.5 / PlayerConnection / 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.
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.
The signalling server object that spawned this player.
WebSocket
The websocket coupled to this player connection.
string
The remote address of this connection. Only used as display.
playerId:
string
Defined in: Signalling/src/PlayerConnection.ts:29
protocol:
SignallingProtocol
Defined in: Signalling/src/PlayerConnection.ts:33
optional
remoteAddress:string
Defined in: Signalling/src/PlayerConnection.ts:37
subscribedStreamer:
null
|IStreamer
Defined in: Signalling/src/PlayerConnection.ts:35
transport:
ITransport
Defined in: Signalling/src/PlayerConnection.ts:31
getPlayerInfo():
IPlayerInfo
Defined in: Signalling/src/PlayerConnection.ts:88
Returns a descriptive object for the REST API inspection operations.
An IPlayerInfo object containing viewable information about this connection.
getReadableIdentifier():
string
Defined in: Signalling/src/PlayerConnection.ts:71
Returns an identifier that is displayed in logs.
string
A string describing this connection.
IMessageLogger
.getReadableIdentifier
sendMessage(
message
):void
Defined in: Signalling/src/PlayerConnection.ts:79
Sends a signalling message to the player.
BaseMessage
The message to send.
void