transaqgrpc
transaqgrpc copied to clipboard
grpc wrapper for transaq connector
TransaqGrpcWrapper
Description
gRPC interface around TransaqConnector to be able to connect from different languages via TCP (remote procedure call) and linux as well
Modules
- tqgrpcserver - server around txmlconnector64.dll
- client
- java - java client grpc example
- csharp - c# client grpc example
- protos/transaq.proto - service description, see below
Service proto description
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.firelib";
option java_outer_classname = "Transaq";
package firelib;
service TransaqConnector {
// streaming messages from transaq api
// you can connect from multiple applications and messages will be broadcasted
rpc connect (Empty) returns (stream Str) {}
// method to call command, returns string from transaqapi
rpc sendCommand(Str) returns (Str){}
}
//just wrapper around string as grpc does not allow to use plain string in interface
message Str{
string txt = 1;
}
message Empty {}
Starting server in Linux
server can be started with Wine version 4.0 , Wine has to have .net installed ( should be prompted)
Example output:
ivan@fire:~/vbshare$ wine win7-x64/tqgrpcserver.exe
Initialize() OK
Greeter server listening on port 50051
Press any key to stop the server...
Known issues
- russian messages does not look good in console output
- port is unprotected - hackers can break this from outside!! need to enable SSL in grpc