Exemple #1
0
 //送信が正しく完了したか
 //private bool ThreadBoolean;
 /// <summary>
 /// コンストラクタ
 /// </summary>
 public HTTPProxy(RequestInfo R, Socket C)
 {
     HttpRequest = R;
     HttpClientSocket = C;
     CallBack = new EndHTTPDelegateMethod(this.EndSend);
     //ThreadBoolean = true;
 }
Exemple #2
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 /// <param name="Client">クライアントのソケット</param>
 public ProxyServer(Socket Client, EndRequestDelegateMethod CallBackDelegateMethod, ICollection<string> Bans, UpperProxy Up)
 {
     this.ClientSocket = Client;
     this.Request = new RequestInfo();
     this.CallBack = CallBackDelegateMethod;
     this.BanHostName = Bans;
     this.UP = new UpperProxy(Up.IPAdress, Up.Port);
     if (UP.IPAdress != "") UpperProxyFlg = true;
 }
Exemple #3
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 public SSLProxy(RequestInfo R, Socket C)
 {
     SslRequest = R;
     SslClientSocket = C;
 }
Exemple #4
0
        /// <summary>
        /// スレッドプールの処理用のデリゲート
        /// </summary>
        public void AddNodeInfomation(RequestInfo Req)
        {
            //もし追加されてなかったらメインフォームのイベントにNodeShapeのイベントを追加
            if (GraphData[MainNodeParty].Nodes.AddNode(Req))
            {
                //Keyエラー回避
                try
                {
                    //イベントの追加
                    GraphData[MainNodeParty].Nodes[Req.HostName].NodeShape.Click += new System.EventHandler(this.NodeShape_Click);
                    GraphData[MainNodeParty].Nodes[Req.HostName].NodeShape.MouseUp += new MouseEventHandler(this.NodeShape_MouseUp);
                    GraphData[MainNodeParty].Nodes[Req.HostName].NodeShape.MouseMove += new MouseEventHandler(this.NodeShape_MouseMove);
                    GraphData[MainNodeParty].Nodes[Req.HostName].NodeShape.ContextMenuStrip = contextMenuStrip1;
                }
                catch
                {
                    Console.WriteLine("追加部分のエラー");
                }
                //変化した力の値を変更
                lock (GraphData[MainNodeParty].Nodes)
                {
                    GraphData[MainNodeParty].Nodes[Req.HostName].G = GraphData[MainNodeParty].Nodes["localhost"].G;
                    GraphData[MainNodeParty].Nodes[Req.HostName].L = GraphData[MainNodeParty].Nodes["localhost"].L;
                }
            }
            else
            {
                //最終アクセス日時を更新
                GraphData[MainNodeParty].Nodes[Req.HostName].LastAccessTime = DateTime.Now.ToString();
            }

            //全てのアクセス記録とるので重複OK
            TableItem Ti = new TableItem();
            Ti.SetTableItem(Req.Protocol + "://" + Req.HostName + Req.FileName, Req.HostName, DateTime.Now.ToString());
            lock (GraphData[MainNodeParty].TableItems)
            {
                GraphData[MainNodeParty].TableItems.Add(Ti);
            }
        }