<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Nov 22, 2013, at 4:10 AM, Laurens Van Houtven <_@lvh.io> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div><div><div>Also, I do really really want the protocol and not the transport. This is because I want to pass a reference to the protocol around so that later I can call callRemote on it. That I can also get the transport is mostly just gravy so that I can return nice things for my fake transport's getHost/getPeer.</div></div></div></div></blockquote><div><br></div><div>Except that maybe your protocol is just a BinaryBoxProtocol, and has no callRemote method.  Or maybe it's actually HTTP and feeding things to AMP after some deserialization pass, like via JSON (aren't you even doing this already in some other code?).  Is there even a "protocol" visible to this code in that case?</div><div><br></div><div>If your contract is that you accept an IProtocol, then what you can do is pretty much just call dataReceived and connectionLost ;-) unless you have some other reason to believe it provides some other interfaces.</div><br><blockquote type="cite"><div style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div><div>So, to reiterate:<br><br></div>- I think all the docstrings should reflect the real situation. I guess I need to file a ticket for that.<br></div></div></blockquote><div><br></div><div>Well, that's definitely true.</div><br><blockquote type="cite"><div style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">- Maybe there should be a new API that passes the proto (and actually means "proto" ;))<br></div></blockquote><div><br></div><div>I still think that before providing this new mechanism we need *some* way of declaring that we expect more from "the protocol".</div><br><blockquote type="cite"><div style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I think I have some code up (or will have some code up soon, depending on when you read this email) that does have sort-of working multiplexed transports:<br></div></blockquote></div><br><div>Cool.</div><div><br></div><div>-glyph</div></body></html>