Hi. I'm investigating how to connect custom streams to a Mapi structure. I've been reading, for instance the start_mal_server() function of monetdb5-server-5.16.2/src/tools/embeddedclient.c.in. I now sort of understand how the stream library works (though not fully), and I'm trying to understand how the streams are effectively used by the client of the Mapi struct. I've therefore looking at the start_mal_server() function, and here's a piece of code whose semantics I do not understand:
in = ((stream **) arg)[0]; out = ((stream **) arg)[1]; free(arg); snprintf(buf, sizeof(buf), "in := \"" PTRFMT "\":streams;\n" "out := \"" PTRFMT "\":streams;\n" "mapi.malclient(in, out);\n", PTRFMTCAST in, PTRFMTCAST out); callString(mal_clients, buf, 0);
I'm specifically interested in the 'in' stream since it is the one I would like to write to. Could someone enlighten me here? All the best, -- Guillaume Yziquel http://yziquel.homelinux.org/