Socket programming implementation using Python