Skip to content

Latest commit

 

History

History
148 lines (82 loc) · 3.56 KB

Transport_ITransport.ITransport.md

File metadata and controls

148 lines (82 loc) · 3.56 KB

@epicgames-ps/lib-pixelstreamingcommon-ue5.5 / Transport/ITransport / ITransport

Interface: ITransport

Transport/ITransport.ITransport

An interface to a transport protocol that is in charge of sending and receiving signalling messages. Implement this interface to support your custom transport. You can then supply an instance of your transport to the constructor of SignallingProtocol during startup.

Hierarchy

  • EventEmitter

    ITransport

Implemented by

Table of contents

Properties

Methods

Properties

onMessage

Optional onMessage: (msg: BaseMessage) => void

Callback filled in by the SignallingProtocol and should be called by the transport when a new message arrives.

Type declaration

▸ (msg): void

Callback filled in by the SignallingProtocol and should be called by the transport when a new message arrives.

Parameters
Name Type
msg BaseMessage
Returns

void

Defined in

Transport/ITransport.ts:19

Methods

connect

connect(url): boolean

Connect to a given URL.

Parameters

Name Type Description
url string The URL for the transport to connect to.

Returns

boolean

True if the connection was successful.

Defined in

Transport/ITransport.ts:26


disconnect

disconnect(code?, reason?): void

Disconnect this transport.

Parameters

Name Type Description
code? number An optional disconnect code.
reason? string A descriptive string for the disconnect reason.

Returns

void

Defined in

Transport/ITransport.ts:33


isConnected

isConnected(): boolean

Should return true when the transport is connected and ready to send/receive messages.

Returns

boolean

True if the transport is connected.

Defined in

Transport/ITransport.ts:39


sendMessage

sendMessage(msg): void

Called when the protocol wants to send a message over the transport.

Parameters

Name Type Description
msg BaseMessage The message to send over the transport.

Returns

void

Defined in

Transport/ITransport.ts:14