From: Stephen D. <sd...@gm...> - 2007-10-02 21:50:35
|
Here's some problems with ns_conn channel: - ssl: if you use it (or any other comm module) you'll be surprised when 'puts' gets written in clear text. - If you 'puts' rather than ns_write, you may be surprised when automatic chunking, encoding, compression doesn't work. - maxconnections: The server thinks it knows how many clients it's serving, but by stashing away the socket and returning the conn, it's under counting. - Accounting for number-of-bytes-written is weak (as it is with the ns background writer threads). We could fix this by creating a custom channel type to wrap the conn socket rather than use the standard TcpChannel. Unfortunately, we don't really have the infrastructure to support this: The current writer thread stuff separates the Sock from the Conn and writes directly via the NsDriver* calls, so it passes the SSL test, but doesn't handle the other stuff. For that, you really need a Conn available. So, we might have to move to a model where we can separate a Conn from it's conn-thread. Secondly, none of our Ns_ConnWrite* calls support an asynchronous mode. Or..? |