tcp: add timeout to connect
*: add license headers