[fpc-pascal] libmosquitto headers for FPC

Gustavo Enrique Jimenez gejimenez at gmail.com
Thu Mar 14 21:21:01 CET 2019


El jue., 14 mar. 2019 a las 13:14, Karoly Balogh (Charlie/SGR)
(<charlie at scenergy.dfmk.hu>) escribió:
>
> Hi,
>
> Not sure if anyone have done this already, but I converted the
> libmosquitto (which is a C-written MQTT client library) header
> (mosquitto.h) to Free Pascal, so it allows using libmosquitto from Pascal
> code. I work on some IoT projects lately which transfers data over MQTT,
> and I wanted to write some of the code in Pascal (after some other
> languages failed to meet expectations, business as usual), so I just did
> it. I know some Pascal MQTT libraries exist, but all I encountered seemed
> to have some limitations, or things I didn't like (being too Delphi
> centric, or something) and libmosquitto just seems to be much more used.
>

Thank you very much!

Gustavo


> Note this is only a pure conversion of the C header file using ctypes,
> with some pascalisms added (like proper callback function types). I have
> an additional class-layer on top of it planned, but so far I only got the
> headers converted, but they work in our internal project. I want to add
> some examples later too.
>
> So in case anyone needs this:
>
> http://github.com/chainq/mosquitto-p
>
> As we hopefully will soon use this in production, I sort of committed
> to keep the headers up-to-date.
>
> I tested it on Darwin (x86_64) and Linux (x86_64 and arm), but adding
> Windows support should be trivial. (Probably only needs the right .dll
> name added as linklib, or something.)
>
> Charlie
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list