TCP vs. UDP in Client-Server and P2P Applications