예제 #1
0
 public ProxyBlock(ProxyBlockWeb parent, string id)
 {
     blockId = id;
     parentWeb = parent;
 }
예제 #2
0
        private void initInnerWeb()
        {
            if (innerWeb != null) return;

            string innerWebHost = (string)ProcessRequest("ProcessMetaInfo", BlockMetaInfoType.InnerWebHost, null, null);

            if (innerWebHost == null)
            {
                innerWeb = null;
                return;
            }

            int innerWebPort = (int)ProcessRequest("ProcessMetaInfo", BlockMetaInfoType.InnerWebPort, null, null);
            string innerWebId = (string)ProcessRequest("ProcessMetaInfo", BlockMetaInfoType.InnerWebId, null, null);

            bool connected = parentWeb.PeerManager.Connect(innerWebHost, innerWebPort, innerWebId);

            if ( ! connected )
            {
                innerWeb = null;
                return;
            }

            innerWeb = new ProxyBlockWeb(innerWebId, innerWebHost, innerWebPort, parentWeb.PeerManager);
        }