Add tcpsocket.

TODO:
 * check for getaddrinfo() in configure
 * fallback if getaddrinfo() is unavailable