需要制定tcp ping工具的方向 [英] need direction on making a tcp ping tool

查看:63
本文介绍了需要制定tcp ping工具的方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我想创建一个tcp ping工具......就像你作为大多数操作系统的一部分提供的典型icmp ping工具一样,只是我想报告一个完全tcp连接(或缺少)...我想最重要的信息是报告完成tcp 3次握手完成所花费的时间,但我可以显示的更多统计数据更好。我知道这些已经存在,但我想创建自己的。

1.我应该直接使用socket类吗?或者tcpClient类是否足够?

2.我应该如何得到我所追求的时间统计数据,比如毫秒完成3次握手?作为套接字和相关类的现有属性/方法,是否可以轻松获得统计信息?或者我是否真的需要在开始之前/之后采取时间戳并进行数学运算?

3.我对套接字编程没有经验,所以任何引物的链接都会很棒,或提供任何快速示例就在这里会很棒。我只做了一个与套接字相关的程序,这是几年前的事,但我确实使用套接字类和异步模型来实现*非常简单的客户端/服务器应用程序,基本上只是作为一种学习体验......但那是前一段时间,我不记得所有必要的细节:(

hello,

I would like to is create a tcp ping tool... pretty much like your typical icmp ping tools available as part of most operating systems, only I want to report stats on a full tcp connection (or lack there of)... I guess the most important info would be to report the time is took for the complete tcp 3-way handshake to complete, but the more stats I can show the better. I know these already exist out there but I would like to create my own.

1. Should I use the socket class directly? or would tcpClient class suffice?

2. how should I get time stats I'm after, like milliseconds to complete 3-way handshake? are there stats easily availble as existing properties/methods of the socket and related classes? or would I actually need to take timestamps before/after initiating things and do the math?

3. I'm not experienced with socket programming so any links to primers would be great, or any quick examples provided right here would be awesome. I have only done one sockets related program and it was a few years ago, but I did use the socket class and the async model for a *very* simple client/server app, basically just as a learning experience... but that was a while ago and I don't remember all the necessary details :(

推荐答案

在这里你去....一个 http://blogs.msdn.com/feroze_daud/archive/2005/10/26/485372.aspx 这是一系列使用Socket类实现Ping工具的文章
Here you go....

http://blogs.msdn.com/feroze_daud/archive/2005/10/26/485372.aspx This is a series of articles that implement Ping tool using Socket class


这篇关于需要制定tcp ping工具的方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆