Authorize() публичный Метод

public Authorize ( TransportAddress a ) : Decision
a TransportAddress
Результат Decision
Пример #1
0
            /*
             * Update the SocketState.TAA and check to see if any Edges need
             * to be closed.
             */
            public override void Start(SocketState ss)
            {
                ss.TAA = TAA;
                ArrayList bad_edges = new ArrayList();

                foreach (Socket s in ss.AllSockets)
                {
                    TcpEdge e = ss.GetEdge(s);
                    if (e != null)
                    {
                        if (TAA.Authorize(e.RemoteTA) == TAAuthorizer.Decision.Deny)
                        {
                            //We can't close now, that would invalidate the AllSockets
                            //iterator
                            bad_edges.Add(e);
                        }
                    }
                }
                foreach (TcpEdge e in bad_edges)
                {
                    EL.RequestClose(e);
                    CloseAction ca = new CloseAction(e, null);
                    ca.Start(ss);
                }
            }