示例#1
0
        public void notifyTwoWayReplyReceived(IPAddress fromIP, byte[] buffer, int offset, int size, AsyncCallback originalRequestCallBack, Object originalAppState)
        {
            Console.WriteLine("ProxyNodeController::notify ENTER");

            ProxyNode proxyNode = getProxyNode(fromIP);

            proxyNode.notifyTwoWayReplyReceived(fromIP, buffer, offset, size, originalRequestCallBack, originalAppState);
        }
示例#2
0
        public void notifyOneWayMsg(IPAddress fromIP, byte[] buffer, int offset, int size)
        {
            Console.WriteLine("ProxyNodeController::notify ENTER");

            ProxyNode proxyNode = getProxyNode(fromIP);

            proxyNode.notifyOneWayMsg(fromIP, buffer, offset, size);
        }
示例#3
0
/*		public interface IProxy
 *              {
 *                      //void notifyMsgRec(IPAddress fromIP, Object data, AsyncCallback notifyMsgRecCallBack, Object appState);
 *                              void beginNotifyMsgRec(IPAddress fromIP, Object data, AsyncCallback notifyMsgRecCallBack, Object appState);
 *              }
 */



        public Tashjik.Tier0.TransportLayerCommunicator.Data notifyTwoWayMsg(IPAddress fromIP, byte[] buffer, int offset, int size)
        {
            Console.WriteLine("ProxyNodeController::notifyTwoWayMsg ENTER");
            Tashjik.Tier0.TransportLayerCommunicator.Data data;
            ProxyNode proxyNode = getProxyNode(fromIP);

            data = proxyNode.notifyTwoWayMsg(fromIP, buffer, offset, size);
            return(data);
        }
示例#4
0
 public ProxyNode getProxyNode(IPAddress IP)
 {
     Console.WriteLine("ProxyNodeController::getProxyNode ENTER");
     try
     {
         ProxyNode proxyFound = proxyNodeRegistry.findProxyNode(IP);
         Console.WriteLine("ProxyNodeController::getProxyNode proxyFound");
         return(proxyFound);
     }
     //RELAX: yes i know this is wrong; have to change it
     catch (Exception)
     {
         Console.WriteLine("ProxyNodeController::getProxyNode proxy NOT Found: creating a new 1 and adding to registry");
         ProxyNode n = createProxyNodeDelegate(IP, this);
         proxyNodeRegistry.AddNewEntry(n);
         return(n);
     }
 }
示例#5
0
            public void AddData(ProxyNode n, Object data)
            {
                Console.WriteLine("ProxyNodeController::ProxyNodeData::AddData ENTER");
                foreach (ProxyNodeData proxyNodeData in proxyDataList)
                {
                    if (n == proxyNodeData.proxyNode)
                    {
                        Console.WriteLine("ProxyNodeController::ProxyNodeData::AddData proxyNode found");
                        proxyNodeData.AddDataToQueue(data);
                        return;
                    }
                }
                //proxyNode not existing; so create 1
                Console.WriteLine("ProxyNodeController::ProxyNodeData::AddData proxyNode not existing; so creating 1");
                ProxyNodeData npd = new ProxyNodeData(n);

                npd.AddDataToQueue(data);
                proxyDataList.Add(npd);
            }
示例#6
0
 public void sendMsgTwoWayRelay(ProxyNode sender, byte[] buffer, int offset, int size, AsyncCallback callBack, Object appState, Guid relayTicket)
 {
     Console.WriteLine("ProxyNodeController::sendMsgTwoWayRelay sending data to transportLayerCommunicator");
     //proxyNodeRegistry.AddData(sender, data);
     transportLayerCommunicator.BeginTransportLayerSendTwoWayRelay(sender.getIP(), buffer, offset, size, overlayInstanceGuid, callBack, appState, relayTicket);
 }
示例#7
0
 public void sendMsg(Object data, ProxyNode n)
 {
 }
示例#8
0
        //private String strOverlayType;

        /*internal ProxyNode createProxyNode(IPAddress IP)
         * {
         *      return overlayServerFactory.createProxyNode(strOverlayType, IP, this);
         *
         * }*/

        public void register(ProxyNode proxyNode)
        {
            proxyNodeRegistry.AddNewEntry(proxyNode);
        }
示例#9
0
            public void AddNewEntry(ProxyNode n)
            {
                ProxyNodeData npd = new ProxyNodeData(n);

                proxyDataList.Add(npd);
            }
示例#10
0
 public ProxyNodeData(ProxyNode n)
 {
     proxyNode = n;
     msgQueue = new Queue<Object>();
 }
示例#11
0
 public ProxyNodeData(ProxyNode n)
 {
     proxyNode = n;
     msgQueue  = new Queue <Object>();
 }
示例#12
0
 public void AddNewEntry(ProxyNode n)
 {
     ProxyNodeData npd = new ProxyNodeData(n);
     proxyDataList.Add(npd);
 }
示例#13
0
 public void AddData(ProxyNode n, Object data)
 {
     Console.WriteLine("ProxyNodeController::ProxyNodeData::AddData ENTER");
     foreach(ProxyNodeData proxyNodeData in proxyDataList)
     {
         if(n==proxyNodeData.proxyNode)
         {
             Console.WriteLine("ProxyNodeController::ProxyNodeData::AddData proxyNode found");
             proxyNodeData.AddDataToQueue(data);
             return;
         }
     }
     //proxyNode not existing; so create 1
     Console.WriteLine("ProxyNodeController::ProxyNodeData::AddData proxyNode not existing; so creating 1");
     ProxyNodeData npd = new ProxyNodeData(n);
     npd.AddDataToQueue(data);
     proxyDataList.Add(npd);
 }
示例#14
0
 public void sendMsgTwoWayRelay(ProxyNode sender, byte[] buffer, int offset, int size, AsyncCallback callBack, Object appState, Guid relayTicket)
 {
     Console.WriteLine("ProxyNodeController::sendMsgTwoWayRelay sending data to transportLayerCommunicator");
     //proxyNodeRegistry.AddData(sender, data);
     transportLayerCommunicator.BeginTransportLayerSendTwoWayRelay(sender.getIP(), buffer, offset, size, overlayInstanceGuid, callBack, appState, relayTicket);
 }
示例#15
0
 public void sendMsg(Object data, ProxyNode n)
 {
 }
示例#16
0
        //private String strOverlayType;
        /*internal ProxyNode createProxyNode(IPAddress IP)
        {
            return overlayServerFactory.createProxyNode(strOverlayType, IP, this);

        }*/
        public void register(ProxyNode proxyNode)
        {
            proxyNodeRegistry.AddNewEntry(proxyNode);
        }