Replaced ws with tcp sockets