• <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 天書 閱讀(2134) 評論(0)  編輯 收藏 引用

            <2013年11月>
            272829303112
            3456789
            10111213141516
            17181920212223
            24252627282930
            1234567

            常用鏈接

            留言簿(5)

            隨筆檔案

            文章分類

            文章檔案

            好友的Bolg

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            精品久久一区二区三区| 久久亚洲中文字幕精品有坂深雪| 国产A三级久久精品| 欧美精品国产综合久久| 亚洲熟妇无码另类久久久| 国产精品久久久久9999| 久久精品成人| 色偷偷久久一区二区三区| 精品久久国产一区二区三区香蕉| 久久久久99精品成人片三人毛片 | 久久久久久国产精品美女| 亚洲中文字幕无码久久综合网| 国产精品久久久福利| 久久综合九色综合网站| 国产精品成人久久久久久久| 久久香综合精品久久伊人| 久久久久国产视频电影| 久久精品国产亚洲AV大全| 欧美精品国产综合久久| 欧美久久一区二区三区| 日本精品久久久久中文字幕8| 久久精品国产亚洲AV香蕉| 久久精品国产只有精品66| 中文字幕亚洲综合久久2| 久久成人国产精品| 99久久国产精品免费一区二区| 久久久精品国产Sm最大网站| 国产69精品久久久久99| 97久久天天综合色天天综合色hd | 久久久久久一区国产精品| 久久综合狠狠色综合伊人| 97精品伊人久久大香线蕉app| 亚洲午夜精品久久久久久app| 亚洲а∨天堂久久精品| 亚洲欧美成人久久综合中文网| 久久精品国产色蜜蜜麻豆 | 99蜜桃臀久久久欧美精品网站| 香蕉久久夜色精品国产尤物| 伊人久久大香线蕉综合5g| 免费一级欧美大片久久网| 久久久久99这里有精品10 |