adding support for tcp sockets