Skip to content

Class: Redirect ​

Directs the peer to retry a request at a different URI and/or for a different Full Track Name (§10.6.1). Carried by a REQUEST_ERROR whose code is REDIRECT.

Constructors ​

Constructor ​

new Redirect(connectUri, trackNamespace, trackName): Redirect

Parameters ​

connectUri ​

string | undefined

trackNamespace ​

Tuple

Empty, together with an empty Redirect.trackName, means reuse the original request's track.

trackName ​

Uint8Array

Empty for namespace-scoped requests, which have no track name to redirect.

Returns ​

Redirect

Properties ​

connectUri ​

readonly connectUri: string | undefined

Undefined means reuse the current session's URI.


trackName ​

readonly trackName: Uint8Array

Empty for namespace-scoped requests, which have no track name to redirect.


trackNamespace ​

readonly trackNamespace: Tuple

Empty, together with an empty Redirect.trackName, means reuse the original request's track.

Accessors ​

keepsOriginalTrack ​

Get Signature ​

get keepsOriginalTrack(): boolean

True when the redirect names no track of its own, so the original request's track carries over.

Returns ​

boolean

Methods ​

serialize() ​

serialize(): FrozenByteBuffer

Returns ​

FrozenByteBuffer


deserialize() ​

static deserialize(buf): Redirect

Parameters ​

buf ​

BaseByteBuffer

Returns ​

Redirect