On Tue, Sep 11, 2012 at 1:01 PM, William Henry <[email protected]> wrote:
> > > ----- Original Message ----- > > On Tue, Sep 11, 2012 at 11:57 AM, Ted Ross <[email protected]> wrote: > > > > > If I have a container built on proton and I want to establish a > > > link > > > between two nodes in the container, I would like to use pn_link_t > > > so I have > > > all the available link features. Is there a way to establish > > > internal > > > links? I assume that it would require a loopback connection of > > > some sort > > > since the driver is based on connectors. > > > > > > As I type this, I realize that this is a driver issue. Does the > > > proton > > > driver have an internal loopback capability or should connections > > > be > > > established to localhost or ::0? > > > > > > > It doesn't currently do anything special for loopback, although that > > would > > certainly be possible if it proved to be a bottleneck. For the moment > > I'd > > just use localhost. > > For the moment. > The easy(er) thing to do here if you wanted to experiment with some kind of optimized loopback would be to have the driver feed bytes directly between pn_input and pn_output. That would eliminate the overhead of actually sending bytes through the loopback socket. I have no idea how significant that would be since the transport would still be encoding and decoding every frame. Doing something that avoided the codec overhead would likely provide significantly more savings, but would be more involved as you'd have to code against interfaces that are currently private to the connection and transport. --Rafael
