created socket communication in C