adding template class for TCP/IP communications