Skip to main content

server:grpc start server

Version: 0.0.0

Description

Starts a dpf's grpc server (if local) or connect to one and keep it waiting for requests in a streams.

Inputs

InputNameExpected type(s)Description
Pin 0ipstringIf no ip address is put, the local ip address is taken
Pin 1portstring, int32If no port is put, port 50052 is taken
Pin 2starting_optionint32default is 1 that starts server in new thread. With 0, this thread will be waiting for grpc calls and will not be usable for anything else. With 2, it the server will be started in a new process.
Pin 3should_start_serverboolIf true, the server is assumed to be local and is started. If false, only a client (able to send grpc calls) will be started
Pin 4data_sourcesdata_sourcesA data source with result key 'grpc' and file path 'port:ip' can be used instead of the input port and IP.
Pin 5dpf_contextstring, int32This pin is associated with pin(2) = 2 (server started in a new process). User can enter the integer associated with a DPF context (1: Standalone Context - DpfCoreStandalone.xml, 3: Custom - DpfCustomDefined.xml) or a string with the path of the XML specifying the context.

Outputs

OutputNameExpected type(s)Description
Pin 0grpc_streamsstreams_containerdpf streams handling the server, if the server is started in this thread, then nothing is added in output

Configurations

NameExpected type(s)Default valueDescription
mutexboolfalseIf this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.

Scripting

Category: server

Plugin: grpc

Scripting name: grpc_start_server

Full name: server.grpc_start_server

Internal name: grpc::stream_provider

License: None

Changelog

  • Version 0.0.0: Initial release.