ns_write
provides low level access to the socket. You use it when you want to, or have to:
- Write your own complete response.
- Use several calls to send information out the socket.
- Impress your friends :)
ReturnHeaders
mentioned above uses ns_write
to create a basic response.
My feeling it that ns_write
doesn't work as intended with the request processor, which wants to bundle everything up and send it at one time.