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); }
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); }
/* 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); }
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); } }
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); }
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); }
public void sendMsg(Object data, ProxyNode n) { }
//private String strOverlayType; /*internal ProxyNode createProxyNode(IPAddress IP) * { * return overlayServerFactory.createProxyNode(strOverlayType, IP, this); * * }*/ public void register(ProxyNode proxyNode) { proxyNodeRegistry.AddNewEntry(proxyNode); }
public void AddNewEntry(ProxyNode n) { ProxyNodeData npd = new ProxyNodeData(n); proxyDataList.Add(npd); }
public ProxyNodeData(ProxyNode n) { proxyNode = n; msgQueue = new Queue<Object>(); }
public ProxyNodeData(ProxyNode n) { proxyNode = n; msgQueue = new Queue <Object>(); }
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); }
//private String strOverlayType; /*internal ProxyNode createProxyNode(IPAddress IP) { return overlayServerFactory.createProxyNode(strOverlayType, IP, this); }*/ public void register(ProxyNode proxyNode) { proxyNodeRegistry.AddNewEntry(proxyNode); }