@openiap/nodeapi / Exports / protowrap
Class: protowrap
Table of contents
Constructors
Properties
Methods
- ClientCleanup
- CommandToProto
- CreateStream
- DownloadFile
- IsPendingReply
- RPC
- ReceiveFileContent
- SetStream
- UploadFile
- _RPC
- connect
- get
- getChecksum
- getFileChecksum
- init
- pack
- post
- sendFileContent
- sendMesssag
- serve
- unpack
Constructors
constructor
• new protowrap()
Properties
defaultprotocol
▪ Static
defaultprotocol: clientType
= "pipe"
Defined in
grpc_server_options
▪ Static
grpc_server_options: ChannelOptions
Defined in
openiap_proto
▪ Static
openiap_proto: ProtobufTypeDefinition
| ServiceClientConstructor
| GrpcObject
Defined in
protoRoot
▪ Static
protoRoot: any
Defined in
Methods
ClientCleanup
▸ Static
ClientCleanup(client
, onClientDisconnected
, error
): void
Parameters
Name | Type |
---|---|
client | client |
onClientDisconnected | any |
error | string | Error |
Returns
void
Defined in
CommandToProto
▸ Static
CommandToProto(command
): string
Parameters
Name | Type |
---|---|
command | any |
Returns
string
Defined in
CreateStream
▸ Static
CreateStream(client
, stream
, payload
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
client | client |
stream | any |
payload | any |
Returns
Promise
<unknown
>
Defined in
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
IsPendingReply
▸ Static
IsPendingReply(client
, payload
): any
Parameters
Returns
any
Defined in
RPC
▸ Static
RPC(client
, payload
): Promise
<Envelope
>
Parameters
Name | Type |
---|---|
client | client |
payload | any |
Returns
Promise
<Envelope
>
Defined in
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
SetStream
▸ Static
SetStream(client
, stream
, rid
): any
Parameters
Name | Type |
---|---|
client | client |
stream | any |
rid | string |
Returns
any
Defined in
UploadFile
▸ Static
UploadFile(client
, filename
, jwt
): Promise
<UploadResponse
>
Parameters
Name | Type |
---|---|
client | client |
filename | string |
jwt | string |
Returns
Promise
<UploadResponse
>
Defined in
_RPC
▸ Static
_RPC(client
, payload
): [string
, Promise
<any
>]
Parameters
Name | Type |
---|---|
client | client |
payload | any |
Returns
[string
, Promise
<any
>]
Defined in
connect
▸ Static
connect(apiurl
, clientConstructor?
): client
Parameters
Name | Type | Default value |
---|---|---|
apiurl | string | undefined |
clientConstructor | () => iclient | client |
Returns
Defined in
get
▸ Static
get(url
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
url | any |
Returns
Promise
<unknown
>
Defined in
getChecksum
▸ Static
getChecksum(buffer
): string
Parameters
Name | Type |
---|---|
buffer | any |
Returns
string
Defined in
getFileChecksum
▸ Static
getFileChecksum(filePath
): Promise
<string
>
Parameters
Name | Type |
---|---|
filePath | any |
Returns
Promise
<string
>
Defined in
init
▸ Static
init(): Promise
<void
>
Returns
Promise
<void
>
Defined in
pack
▸ Static
pack(command
, payload
): Object
Parameters
Name | Type |
---|---|
command | any |
payload | any |
Returns
Object
Name | Type |
---|---|
type_url | string |
value | any |
Defined in
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
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
sendMesssag
▸ Static
sendMesssag(client
, payload
, id
, dumpmsg
): number
Parameters
Name | Type |
---|---|
client | client |
payload | any |
id | string |
dumpmsg | boolean |
Returns
number
Defined in
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
unpack
▸ Static
unpack(message
): any
[]
Parameters
Name | Type |
---|---|
message | any |
Returns
any
[]