examples of socket programming in python and c