Hello,

I am experimenting on implementing Firefox over a realiable, out-of-sequence delivering transport protocol (SCTP). I.e., similar to TCP, SCTP provides no loss/duplicates/errors guarantee, but unlike TCP, SCTP can deliver data out-of-sequence to the receiving application (Firefox). SCTP achieves this through 'streams' which can be considered logical one-way pipes with independent sequence space, and all data arriving within a stream are delivered in-order to the application. More info can be found in SCTP RFC2960.

sendmsg and recvmsg calls over an SCTP socket can take an SCTP stream number as argument so that an application can send or receive on a particular SCTP stream. The major factor to be considered for modifying Firefox over SCTP streams is the following: Different responses can and will be read interleaved (out-of-order) from the SCTP socket. If requests are pipelined, Firefox should not assume that data from subsequent read()s on the socket belong to the same response. With SCTP, subsequent read() on the same SCTP stream belong to the same response.

Now, I've been a little bit successful in implementing a part Firefox over SCTP streams. I've modified NSPR to write different HTTP requests on different SCTP streams, and read HTTP responses from SCTP streams. Note that this implementation assumes that each Write() on a nsOutputStream is for a different request, but I am OK with this assumption at the moment.

I would like to know if there is a realistic way to do the following:

- NSPR communicates the SCTP stream number on which a request was written to the HTTP protocol module. The SCTP stream number is unique to a HTTP Transaction, and should be stored somewhere, perhaps in nsHttpTransaction. Transfer of this stream number could be via a new method - WriteOnSCTPStream() (in nsOutputStream) that is very similar to Write(). WriteOnSCTPStream() just has an extra pointer argument, where the callee writes the SCTP stream information.

- nsHttpTransaction accepts the response from nsInputStream only if the response came on the SCTP stream it stored as mentioned above.

I chose nsHttpTransaction as the point to do these modifications since nsHttpTransaction is an atomic request-response transaction entitiy. Maybe the modifications should move closer to NSPR than nsHttpTransaction? Maybe I should take a completely different route to achieve what I need?

I would appreciate any comments/critics on the above.

I also have the following questions regarding pipelining:

- In case of pipelining n requests, I assume n instances of nsHttpTransaction are created. Is that right? - Does the implementation use the Content-Length field in the resonse header to demarcate the end of a response?

Any help is very much appreciated.

Thanks,
Preethi
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to