clearLinks() public method

public clearLinks ( ) : Erlang.NET.Link[]
return Erlang.NET.Link[]
Ejemplo n.º 1
0
        // used to break all known links to this mbox
        public void breakLinks(OtpErlangObject reason)
        {
            Link[] l = links.clearLinks();

            if (l != null)
            {
                int len = l.Length;

                for (int i = 0; i < len; i++)
                {
                    exit(1, l[i].Remote, reason);
                }
            }
        }
Ejemplo n.º 2
0
        /*
         * When the connection fails - send exit to all local pids with links
         * through this connection
         */
        void breakLinks()
        {
            lock (this)
            {
                if (links != null)
                {
                    Link[] l = links.clearLinks();

                    if (l != null)
                    {
                        int len = l.Length;

                        for (int i = 0; i < len; i++)
                        {
                            // send exit "from" remote pids to local ones
                            self.deliver(new OtpMsg(OtpMsg.exitTag, l[i].Remote, l[i].Local, new OtpErlangAtom("noconnection")));
                        }
                    }
                }
            }
        }