| 31 | }; |
| 32 | |
| 33 | static void *thread_function(void *param) { |
| 34 | struct thread_data *p = (struct thread_data *) param; |
| 35 | printf("THREAD STARTED\n"); |
| 36 | for (;;) { |
| 37 | sleep(2); |
| 38 | mg_wakeup(p->mgr, p->conn_id, "hi!", 3); // Send to parent |
| 39 | } |
| 40 | // Free all resources that were passed to us |
| 41 | free(p); |
| 42 | return NULL; |
| 43 | } |
| 44 | |
| 45 | // HTTP request callback |
| 46 | static void fn(struct mg_connection *c, int ev, void *ev_data) { |
nothing calls this directly
no test coverage detected