On 25/04/2013 4:02 PM, Brian Anderson wrote:
The main TCP implementation, `TcpStream for ~RtTcpStream`, will delegate to whatever boxed RtTcpStream it is given. Because TcpStream is responsible for raising conditions, then you can configure the scheduler to provide you with either uv-based or native implementations and you will get the same conditions raised.
Oh! Ok then. If there's already this level of indirection, maybe we could arrange for conditions to return an optional ~RtTcpStream to take over from the current one?
It's only if you want to replace one implementation of the public interface for another that you need to worry about whether they raise the same conditions - and that may not be a real requirement.
Indeed. I only wanted to gesture at the solution-space I had in mind, not dictate an exact solution; I suspect you have the set of actually-occurring constraints (and conditions) much more firmly in mind than I do. If there's a mechanism to swap in a user-provided "proxy" ~RtTcpStream or such at a lower level, that may be fine too.
-Graydon _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
