• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 124,  comments - 29,  trackbacks - 0

            using System;
            using System.Collections.Generic;
            using System.ComponentModel;
            using System.Data;
            using System.Drawing;
            using System.Text;
            using System.Windows.Forms;
            using System.Net;
            using System.Net.NetworkInformation;

            namespace PingIpAddress
            {
                public partial class Form1 : Form
                {
                    public Form1()
                    {
                        InitializeComponent();
                    }
                  
                    private void Form1_Load(object sender, EventArgs e)
                    {
                       
                       
                    }
                    private Ping pingSender = new Ping();
                    private string strIP = "";
                    private void button1_Click(object sender, EventArgs e)
                    {
                        strIP = txtIP.Text;
                        PingOptions pingOption = new PingOptions();
                        pingOption.DontFragment = true;

                        string data = "sendData:goodgoodgoodgoodgoodgood";
                        byte[] buffer = Encoding.ASCII.GetBytes(data);
                        int timeout = 120;
                        PingReply reply = pingSender.Send(strIP, timeout, buffer);
                        if (reply.Status == IPStatus.Success)
                        {
                            MessageBox.Show("能ping通 ");
                        }
                        else
                        {
                            MessageBox.Show("ping不通");
                        }
                    }
                }
            }

            using System;
            using System.Collections.Generic;
            using System.Windows.Forms;
            using System.Net;
            using System.Net.Sockets;
            using System.Threading;
            using System.Text;
            using OSSDOM.CMT.ConfigData;
            using System.Net;
            using System.Net.NetworkInformation;

            namespace OSSDOM.CMT.CommonUse
            {
                
            public class PingServer
                
            {
                    
                    
            private IPEndPoint EPServer = null;
                    
            public PingServer()
                    
            {
                        
            try
                        
            {
                            EPServer 
            = new IPEndPoint(IPAddress.Parse(MakeOptionDatas.MakeOptionDataInstance.proxy.strProxyIP), int.Parse(MakeOptionDatas.MakeOptionDataInstance.proxy.strProxyPort));
                        }

                        
            catch (Exception ex)
                        
            {
                            MessageBox.Show(ex.Message 
            + " " + ex.StackTrace);
                        }

                    }

                    
            //連接
                    private Ping pingSender = new Ping(); 
                    
            public bool ServerConnected()
                    
            {
                        
            try
                        
            {
                            PingOptions pingOption 
            = new PingOptions();
                            pingOption.DontFragment 
            = true;

                            
            string data = "sendData";
                            
            byte[] buffer = Encoding.ASCII.GetBytes(data);
                            
            int timeout = 120;
                            PingReply reply 
            = pingSender.Send(EPServer.Address, timeout, buffer);
                            
            if (reply.Status == IPStatus.Success)
                            
            {
                                
            //MessageBox.Show("能ping通 ");
                                return true;
                            }

                            
            else
                            
            {
                                
            //MessageBox.Show("ping不通");
                                return false;
                            }

                            
                            
                        }

                        
            catch
                        
            {
                            
            return false;
                        }

                    }

                    
            //斷開
                    public void Disconnect()
                    
            {
                        
                    }

                }

            }

            posted on 2010-02-25 14:47 天書 閱讀(2130) 評論(0)  編輯 收藏 引用

            <2009年4月>
            2930311234
            567891011
            12131415161718
            19202122232425
            262728293012
            3456789

            常用鏈接

            留言簿(5)

            隨筆檔案

            文章分類

            文章檔案

            好友的Bolg

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            亚洲国产另类久久久精品 | 亚洲欧美伊人久久综合一区二区| 无码精品久久久久久人妻中字| 婷婷久久综合| 亚洲精品综合久久| 久久精品国产亚洲77777| 青青草国产成人久久91网| 亚洲国产成人久久一区WWW| 性高朝久久久久久久久久| 成人资源影音先锋久久资源网| 久久se精品一区精品二区| 亚洲第一永久AV网站久久精品男人的天堂AV | 精品综合久久久久久888蜜芽| 久久国产欧美日韩精品 | 性做久久久久久久久| 久久高清一级毛片| 亚洲中文字幕伊人久久无码| 精品久久久久久久无码| 伊人久久大香线蕉AV一区二区| 久久午夜夜伦鲁鲁片免费无码影视| 精品无码久久久久久尤物| 久久精品中文字幕有码| 久久婷婷人人澡人人| 国产精品嫩草影院久久| 色欲综合久久躁天天躁蜜桃| 久久综合偷偷噜噜噜色| 久久久久se色偷偷亚洲精品av| 欧美大战日韩91综合一区婷婷久久青草 | 国产成年无码久久久免费| 久久精品无码午夜福利理论片| 久久久久亚洲精品无码网址 | 少妇熟女久久综合网色欲| 久久夜色精品国产网站| 久久露脸国产精品| 久久中文字幕一区二区| 国产产无码乱码精品久久鸭| 久久免费看黄a级毛片| 国产精品久久久久久久久久影院| 亚洲国产成人久久精品99| 国内精品久久久久影院日本 | 久久久人妻精品无码一区|