Golang trugw creates proxy connection to the Tru peers using unix socket.
If you can't link the tru package to your application than use this standalone unix socket server to communicate with any tru peers.
The trugw contains two packages: trugw and splitter, and four examples in cmd folder.
To execute whall example install and run next applications:
Install Tru and this Trugw repo
mkdir -p ~/go/src/github.com/teonet-go
cd ~/go/src/github.com/teonet-go
git clone https://github.com/teonet-go/tru
git clone https://github.com/teonet-go/trugw
Run on different consoles:
# Tru echo peer
cd ~/go/src/github.com/teonet-go/tru
go run -tags=truStat ./examples/trunet/
# Trugw server
cd ~/go/src/github.com/teonet-go/trugw
go run ./cmd/trugw/server/
# Trugw golang client
cd ~/go/src/github.com/teonet-go/trugw
go run ./cmd/trugw/client -n 5
# Trugw C client
cd ~/go/src/github.com/teonet-go/trugw/cmd/trugw/client-c
gcc main.c ../../../trugw-c/trugw.c -o client-c
./client-c
# Trugw C++ client
cd ~/go/src/github.com/teonet-go/trugw/cmd/trugw/client-cpp
gcc main.cpp ../../../trugw-c/trugw.c -lstdc++ -o client-cpp
./client-cpp
The Tru echo peer
start Tru peer running at udp port 7070. It listening tru connection got messages and send answers it to sender.
The Trugw server
start listening Unix Socket connection, got messages from Trugw client
and resend it to Tru echo peer
by Tru connection. When Trugw server
got answer from Tru echo peer
it resend it back to Trugw client
by unix socket.