Write to socket async