use strands to wrap reads and writes on socket