[fpc-pascal] MQTT package for freepascal/lazarus?
Jean SUZINEAU
jean.suzineau at wanadoo.fr
Sun Oct 23 22:50:16 CEST 2022
May be with a pipe | ?
Something like
mosquitto_sub -h 192.168.117.131 -F '@Y- at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20221023/08ebd442/attachment.htm>
More information about the fpc-pascal
mailing list