最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
国外站点上转过来的资料,模拟ping程序
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
namespace SaurabhPing
{
using System;
using System.Net;
using System.Net.Sockets;
///
/// The Main Ping Class
///
class Ping
{
//Declare some Constant Variables
const int SOCKET_ERROR = -1;
const int ICMP_ECHO = 8;
///
/// The Starting Point of the Class
/// It Takes the Hostname parameter
///
public static void Main(string[] argv)
{
if(argv.Length==0)
{
//If user did not enter any Parameter inform him
Console.WriteLine("Usage:Ping /r") ;
Console.WriteLine(" The name of the Host who you want to ping");
Console.WriteLine("/r Ping the host continuously") ;
}
{
using System;
using System.Net;
using System.Net.Sockets;
///
/// The Main Ping Class
///
class Ping
{
//Declare some Constant Variables
const int SOCKET_ERROR = -1;
const int ICMP_ECHO = 8;
///
/// The Starting Point of the Class
/// It Takes the Hostname parameter
///
public static void Main(string[] argv)
{
if(argv.Length==0)
{
//If user did not enter any Parameter inform him
Console.WriteLine("Usage:Ping
Console.WriteLine("
Console.WriteLine("/r Ping the host continuously") ;
}
相关文章
- Java中两位年份的转化程序代码 09-24
- 求伯君20年跌宕起伏:最牛程序员华丽转身 05-06
- 从程序员到系统分析员(转) 01-12
- 一个新版本的ubb转化程序 01-12
- 程序员的七种武器(转) 01-12
- 简繁转换的程序 01-11