Tutorial with sockets for TCP and UDP