chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] more 'foreign' questions


From: Christoph Lange
Subject: [Chicken-users] more 'foreign' questions
Date: Wed, 27 Mar 2019 16:06:03 +0100

After I now managed quite a lot of my interfacing to the mqtt library, I'm stuck with the following:

I have the following definition of  a message struct, which I in fact get back a pointer to, from a callback:

(bind* "struct mosquitto_message{
          int mid;
          char *topic;
          void *payload;
          int payloadlen;
          int qos;
          ___bool retain;
        };")

When I print what I get in Scheme it says something along the line of #<pointer 0x562b13f1ee58>. Though the library frees the memory, it will -- according to manual -- only do so after the callback returns. So within the callback, I should be able to access / print it's content. Just how?! How do I access the different fields in that struct? Especially the payload?

/Christoph

reply via email to

[Prev in Thread] Current Thread [Next in Thread]