HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Node.js SDK - OutboundStream

Home > @rainway/native > OutboundStream

OutboundStream class

An outbound stream from our device to another Peer on the Rainway Network.

Signature:

export declare class OutboundStream extends EventEmitter<OutboundStreamEvents> 

Extends: EventEmitter<OutboundStreamEvents>

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the OutboundStream class.

Properties

PropertyModifiersTypeDescription
idnumberThe id for this outbound stream.
peerPeerThe peer that owns this outbound stream.
permissionsRainwayInputLevelGets or sets the default permissions granted to peers within this outbound stream. See also OutboundStream.getPeerPermission() which facilities modifying specific peer permissions, overriding this default.
processIdsnumber[]The process ids that this stream is limited to. Only used if is RainwayStreamType.AppIsolation
typeRainwayStreamTypeThe type of this outbound stream.

Methods

MethodModifiersDescription
close()Destroys the peer connection, including all sub resources.
getPeerPermission(peer)Retrieve the (optional) override permissions for a given peer. This overrides OutboundStream.permissions for a specific peer. If no override is present, the value of OutboundStream.permissions will be returned.
setPeerPermission(peer, value)Set the (optional) override permissions for a given peer. This overrides OutboundStream.permissions for a specific peer.