Understanding Sockets in Networking