Inheritance: OtpLocalNode
        protected GenericQueue queue; // messages get delivered here

        #endregion Fields

        #region Constructors

        /*
         * Accept an incoming connection from a remote node. Used by {@link
         * OtpSelf#accept() OtpSelf.accept()} to create a connection based on data
         * received when handshaking with the peer node, when the remote node is the
         * connection intitiator.
         *
         * @exception java.io.IOException if it was not possible to connect to the
         * peer.
         *
         * @exception OtpAuthException if handshake resulted in an authentication
         * error
         */
        // package scope
        internal OtpConnection(OtpSelf self, BufferedTcpClient s)
            : base(self, s)
        {
            this.self = self;
            queue = new GenericQueue();
            start();
        }
 /*
  * Intiate and open a connection to a remote node.
  *
  * @exception java.io.IOException if it was not possible to connect to the
  * peer.
  *
  * @exception OtpAuthException if handshake resulted in an authentication
  * error.
  */
 // package scope
 internal OtpConnection(OtpSelf self, OtpPeer other)
     : base(self, other)
 {
     this.self = self;
     queue = new GenericQueue();
     start();
 }
Example #3
0
 public OtpConnection connect(OtpSelf self)
 {
     return new OtpConnection(self, this);
 }
        /*
         * Create a unique Erlang port belonging to the local node. Since it isn't
         * meaninful to do so, this constructor is private...
         *
         * @param self the local node.
         *
         * @deprecated use OtpLocalNode:createPort() instead
         */
        private OtpErlangPort(OtpSelf self)
        {
            OtpErlangPort p = self.createPort();

            id = p.id;
            creation = p.creation;
            node = p.node;
        }
Example #5
0
 /**
  * Create an {@link OtpServer} from an existing {@link OtpSelf}.
  *
  * @param self
  *                an existing self node.
  *
  * @exception java.io.IOException
  *                    if a ServerSocket could not be created.
  *
  */
 public OtpServer(OtpSelf self)
     : base(self.Node, self.Cookie)
 {
 }