5 ex_gui_network_8c example
gullradriel edited this page 2026-10-09 00:51:57 +02:00

ex_gui_network.c

GUI network chat demo using the n_gui and n_network modules. A simple TCP chat application with an Allegro5 GUI front-end. Run as server: ex_gui_network -p 8080 Run as client: ex_gui_network -s 127.0.0.1 -p 8080

Demonstrates:

  • n_gui: context, windows, labels, textareas, buttons, listbox
  • n_network: netw_make_listening, netw_accept_from_ex, netw_connect, netw_start_thr_engine, netw_add_msg, netw_get_msg, netw_get_state, netw_close, netw_new_pool, netw_pool_add, netw_pool_broadcast, netw_pool_nbclients, netw_destroy_pool
  • n_network_msg: create_msg, delete_msg, add_int_to_msg, add_strdup_to_msg, get_int_from_msg, get_str_from_msg, make_str_from_msg, make_msg_from_str, netmsg_make_string_msg, netw_msg_get_type, netw_get_string