@openiap/nodeapi / Exports / protowrap

Class: protowrap

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new protowrap()

Properties

defaultprotocol

Static defaultprotocol: clientType = "pipe"

Defined in

src/protowrap.ts:63


grpc_server_options

Static grpc_server_options: ChannelOptions

Defined in

src/protowrap.ts:50


openiap_proto

Static openiap_proto: ProtobufTypeDefinition | ServiceClientConstructor | GrpcObject

Defined in

src/protowrap.ts:65


protoRoot

Static protoRoot: any

Defined in

src/protowrap.ts:67

Methods

ClientCleanup

Static ClientCleanup(client, onClientDisconnected, error): void

Parameters

Name Type
client client
onClientDisconnected any
error string | Error

Returns

void

Defined in

src/protowrap.ts:768


CommandToProto

Static CommandToProto(command): string

Parameters

Name Type
command any

Returns

string

Defined in

src/protowrap.ts:90


CreateStream

Static CreateStream(client, stream, payload): Promise<unknown>

Parameters

Name Type
client client
stream any
payload any

Returns

Promise<unknown>

Defined in

src/protowrap.ts:359


DownloadFile

Static DownloadFile(client, id, filename, folder, highWaterMark): Promise<DownloadResponse>

Parameters

Name Type
client client
id string
filename string
folder string
highWaterMark number

Returns

Promise<DownloadResponse>

Defined in

src/protowrap.ts:372


IsPendingReply

Static IsPendingReply(client, payload): any

Parameters

Name Type
client client
payload Envelope

Returns

any

Defined in

src/protowrap.ts:539


RPC

Static RPC(client, payload): Promise<Envelope>

Parameters

Name Type
client client
payload any

Returns

Promise<Envelope>

Defined in

src/protowrap.ts:330


ReceiveFileContent

Static ReceiveFileContent(client, rid, filename, highWaterMark): Promise<unknown>

Parameters

Name Type
client client
rid string
filename string
highWaterMark number

Returns

Promise<unknown>

Defined in

src/protowrap.ts:507


SetStream

Static SetStream(client, stream, rid): any

Parameters

Name Type
client client
stream any
rid string

Returns

any

Defined in

src/protowrap.ts:355


UploadFile

Static UploadFile(client, filename, jwt): Promise<UploadResponse>

Parameters

Name Type
client client
filename string
jwt string

Returns

Promise<UploadResponse>

Defined in

src/protowrap.ts:488


_RPC

Static _RPC(client, payload): [string, Promise<any>]

Parameters

Name Type
client client
payload any

Returns

[string, Promise<any>]

Defined in

src/protowrap.ts:334


connect

Static connect(apiurl, clientConstructor?): client

Parameters

Name Type Default value
apiurl string undefined
clientConstructor () => iclient client

Returns

client

Defined in

src/protowrap.ts:803


get

Static get(url): Promise<unknown>

Parameters

Name Type
url any

Returns

Promise<unknown>

Defined in

src/protowrap.ts:614


getChecksum

Static getChecksum(buffer): string

Parameters

Name Type
buffer any

Returns

string

Defined in

src/protowrap.ts:1274


getFileChecksum

Static getFileChecksum(filePath): Promise<string>

Parameters

Name Type
filePath any

Returns

Promise<string>

Defined in

src/protowrap.ts:1258


init

Static init(): Promise<void>

Returns

Promise<void>

Defined in

src/protowrap.ts:68


pack

Static pack(command, payload): Object

Parameters

Name Type
command any
payload any

Returns

Object

Name Type
type_url string
value any

Defined in

src/protowrap.ts:285


post

Static post(jwt, agent, url, body): Promise<unknown>

Parameters

Name Type
jwt any
agent any
url any
body any

Returns

Promise<unknown>

Defined in

src/protowrap.ts:634


sendFileContent

Static sendFileContent(client, rid, filename, highWaterMark): Promise<unknown>

Parameters

Name Type
client client
rid any
filename any
highWaterMark any

Returns

Promise<unknown>

Defined in

src/protowrap.ts:434


sendMesssag

Static sendMesssag(client, payload, id, dumpmsg): number

Parameters

Name Type
client client
payload any
id string
dumpmsg boolean

Returns

number

Defined in

src/protowrap.ts:682


serve

Static serve(protocol, onClientConnected, port, path, wss, app, http, clientConstructor?): Object

Parameters

Name Type Default value
protocol clientType undefined
onClientConnected any undefined
port any undefined
path any undefined
wss any undefined
app any undefined
http any undefined
clientConstructor () => iclient client

Returns

Object

Name Type
app any
client any
connected boolean
connecting boolean
http any
id string
pending {}
port any
protocol clientType
ws any
wss any

Defined in

src/protowrap.ts:1008


unpack

Static unpack(message): any[]

Parameters

Name Type
message any

Returns

any[]

Defined in

src/protowrap.ts:296