protected internal AbstractConnection(OtpLocalNode self, OtpPeer other, string cookie)
: this(self, other, null, cookie)
{
// now get a connection between the two...
int port = OtpEpmd.lookupPort(peer);
// now find highest common dist value
if ((peer._proto != self._proto) || (self._distHigh < peer._distLow) || (self._distLow > peer._distHigh))
{
throw new System.IO.IOException("No common protocol found - cannot connect");
}
// highest common version: min(peer.distHigh, self.distHigh)
peer.distChoose = (peer._distHigh > self._distHigh ? self._distHigh : peer._distHigh);
doConnect(port);
this.name = peer.node();
this.connected = true;
}