rendered paste body#include <stdio.h>#include <lwipc.h>/* cheap interning: typedef const * const intern_t; */LWintern_t Mhello = "hello";LWintern_t Mgoodbye = "goodbye";/* this is converted to a more efficient hash table by LW_init_loop */LWmessage_t table[] = { { Mhello, 1, handle_hello }, { Mgoodbye, 0, handle_goodbye }, { NULL, 0, NULL }};void handle_hello(char *msg){ printf("hello: got %s\n", msg);}void handle_goodbye(void){ printf("bye!\n"); LW_exit(0);}int main(void){ LWloop_t *loop = LW_init_loop(table); LW_init_msg(Mhello, 1, "hello from main()"); LW_final_msg(Mgoodbye, 0); LW_run_loop(loop); return 0;}