Commit Socket in C