mirror of
https://github.com/open-simh/simh.git
synced 2026-01-13 15:27:46 +00:00
Cleanup/Simplification by: 1) removing irrelevant master flag variable from sim_close_sock and thus sim_err_sock 2) change previous boolean feature arguments (datagram, nodelay, reuseaddr) to flag bits in a single option argument. This allows for features to be added by new flag bits which don't change the calling signatures. 3) changed all status returns to be int (vs t_stat) with success being 0 and error being -1 4) removed unneeded simh specific type references to allow sim_sock to be used by n Extended API by providing flags to influence socket setup/behavior: SIM_SOCK_OPT_REUSEADDR Retains prior behavior when sim_switches had -U set SIM_SOCK_OPT_DATAGRAM UDP socket setup provided for when prior datagram argument was specified SIM_SOCK_OPT_NODELAY TCP Nagle disable provided for when prior nodelay argument was specified SIM_SOCK_OPT_BLOCKING Blocking socket mode (detault is non blocking)