Is the Goode originating on the Pi?
If so, I would use Chilipeppr or similar web-based sender with the Serial Port JSON Server running on the Pi: https://github.com/chilipeppr/serial-port-json-server
Even if you don’t want to use the chilipeppr interface, spjs will manage timing and flow of Gcode to the TinyG.
If you are only using the Pi as a network interface to the TinyG, then it gets even better, as you can send to spjs across the network from the originating computer, whatever it is.
John Lauer wrote both and the spjs has been adopted by many other developers to handle serial Comms, including the latest Arduino IDE – it’s a very well-proven solution.
Other ways could be to use octoprint on the Pi, set up a websockets server, remote Gcode sender like UGS: https://github.com/winder/Universal-G-Code-Sender