Hi Yoshita,
App server code uses Glib and gio libraries to serve multiple clients and handling tcp and udp connections. You can see that in main function, tcp listener is set to welcome & save new clients.
( gboolean network_read() and gboolean new_connection() )
g_main_loop_new() creates a new GMainLoop which g_main_loop_run(...) runs.
ivy headers are used to read, write data to ivybus and setup some listeners for specific ivy messages. These messages are send to clients which were already saved by new_connection() function. network_read() function handles client requests like moving way-points, or changing blocks.
I don't have so much experience on gio/glib libraries so any improvements on code will definitely welcomed :)