
On Dec 10, 2007, at 1:00 PM, Andrey Tcherepanov wrote:
... What do you think? [snip]
(assuming that "what you think was directed to all of us, not just Dean :), so below is my $0.02 CAD)
Of course, otherwise I wouldn't be filling you INBOX with all these messages =)
I like the idea of basic_message<> (which could be used for SMTP and gods know what else as well), but what about UDP servers or, generally speaking, multi-transport protocols?
Although http is sitting on top of TCP, there is an RTSP protocol which claims to be derived from HTTP/1.1 in most parts (well, at least RFC has lots of backrefs to HTTP spec), but allows to use connectionless transport (aka UDP). Moreover, RTSP treats Clients as something that can receive asynchronous stream change notifications (if allowed). I am not arguing that your design will not cover 95% of useful cases, but I think protocol parsing and transport layer might need more separation. This way if brave person will decide to implement RTSP (for example) as derived from HTTP, he/she will not be limited by TCP transport.
In the current Pion code, the parsing & transport are handled independently. I've never heard of HTTP being used on top of something other than TCP. But I think we could probably accommodate for this by slightly altering the tcp_server / http_server class hierarchy. Take care, -Mike