Post B6nNrGyCz8k2EvGzDM by meeper@netzsphaere.xyz
 (DIR) More posts by meeper@netzsphaere.xyz
 (DIR) Post #B6nNrGyCz8k2EvGzDM by meeper@netzsphaere.xyz
       0 likes, 0 repeats
       
       int setsockopt(int socket, int level, int option_name, const void *option_value, socklen_t option_len);What kind of abomination is this function signature
       
 (DIR) Post #B6nNrH9CKHX2n0PlLM by kirby@freerobuxextremist.com
       0 likes, 0 repeats
       
       @meeper i dont recall it being that long but i guess i developed a tolerance to legacy libc design choices
       
 (DIR) Post #B6nOM4zfYyna4Ye7fM by meeper@netzsphaere.xyz
       0 likes, 0 repeats
       
       @kirby They have an arguement specifially for the type size of the arguement to an option which is a bitmask and that just feels wrong
       
 (DIR) Post #B6nOM5DUjZrElR7ADQ by meeper@netzsphaere.xyz
       0 likes, 1 repeats
       
       @kirby also int yes=1;//char yes='1'; // Solaris people use this// lose the pesky "Address already in use" error messagesetsockopt(listener, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes);sizeof yes
       
 (DIR) Post #B6na0Utdm9PVUIIkgC by iamtakingiteasy@eientei.org
       0 likes, 0 repeats
       
       @meeper @kirby Not all socket options are bitmasks or single integers, some are entire structs, particularly for PMTU/multicast/timeouts. Also considering there can be arbitrary number of OS-specific sockets like netlink, it makes sense for generic API to not even try to provide typed variants.