Add DNS state
Wrap nonblocking write.