Added basic support of TCP threads.