trying to learn and practice socket programming in C