May be with a pipe | ?
Something like
mosquitto_sub -h 192.168.117.131 -F '@Y-@m-@d @H:@M:@S ; %t ; %p' -t '#' |
SomePascalProgram
This way you'll receive the output of mosquitto_sub on the standard
input of SomePascalProgram.
I've tested locally on an Apache log with
tail -f /var/log.apache2/access.log | grep http
Le 23/10/2022 à 15:31, Bo Berglund via fpc-pascal a écrit :
What happens if the data in the AProcess output stream is less than my buffer
size, will it then stall until as many messages have arrived as will fill the
buffer?
I think you can useAProcess.Output.NumBytesAvailable to avoid stalling
and read just what is available :
https://www.freepascal.org/docs-html/fcl/pipes/tinputpipestream.numbytesavailable.html
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal