Added Tcp functions