Is it posible to pass a C function as callback to OCaml?
问题 I'm studying on how to integrate an OCaml TCP/IP stack into my C++ project. I already know how to call C from OCaml and call OCaml from C thanks to this answer: OCaml as C library, hello world example The OCaml will be controlled by C++, not the other way around. So, for a TCP/IP stack, I must be able to send and receive packets. I can easily send data to the TCP/IP stack through C++, but how to receive it? I need to pass a C function (a callback) as a parameter to OCaml so it delivers the