Otp.AbstractConnection.AbstractConnection C# (CSharp) Method

AbstractConnection() protected method

protected AbstractConnection ( OtpLocalNode self, OtpPeer other, string cookie ) : System
self OtpLocalNode
other OtpPeer
cookie string
return System
        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;
        }
        

Same methods

AbstractConnection::AbstractConnection ( ) : System
AbstractConnection::AbstractConnection ( OtpLocalNode self, OtpPeer other ) : System
AbstractConnection::AbstractConnection ( OtpLocalNode self, OtpPeer peer, System s, string cookie ) : System
AbstractConnection::AbstractConnection ( OtpLocalNode self, System s ) : System