Write once to socket