a sample of socket programming