Simple socket programming in C