Return more detailed error codes, e.g. with 'getsockopt()' valopt == 111: ECONNREFUSED "Connection refused" if there is a remote host but no server service listening.
Cleanup constants: In <sys/socket.h> are defined SHUT_RD, SHUT_WR, SHUT_RDWR with 0, 1, 2, according to man 2 shutdown.
Member UpnpResolveURL (const char *BaseURL, const char *RelURL, char *AbsURL)
There is some unnecessary allocation and deallocation going on here because of the way resolve_rel_url() was originally written and used. In the future it would be nice to clean this up.