Logical Labs Multipeer Module

API Docs for: 1.0.0
Show:

OutputStream Class

Module: Readme

Objects of this class represent a stream that can be used to send data to a peer. Use the openStream function to create these objects.

Item Index

Properties

Methods

close

()

Available since 1.0.0

Closes the stream.

isInputStream

()

Available since 1.0.0

Returns false.

isOutputStream

()

Available since 1.0.0

Returns true.

write

(
  • params
)

Available since 1.0.0

Attempts to write the contents of the provided data buffer to the stream.

The streamWriteCompleted event is fired when the operation is completed.

Parameters:

  • params Object
    • buffer TiBuffer

      The data to be written.

Properties

hasSpace

Boolean read-only

Available since 1.0.0

Returns whether the stream can be written to.