Socket communication sample in C