Skip to main content

Posts

Showing posts from February, 2013

Protocol agnostic socket programming

This is more of a mental note for myself. Now and then I need boilerplate code for socket setup which always ends with me having to hunt down all the gems that are hiding. This isn't your normal boilerplate code, this will assume very little regarding protocol and address family. Instead the only real argument is the service which to bind to. Feel free to use/steal it freely - if I can prevent more hard coded AF_INET applications the world will be a prettier place.