在C#或java中发送/接收的Windows LAN状态字节(数据包) [英] Windows LAN status bytes (packets) sent/received in C# or java

查看:64
本文介绍了在C#或java中发送/接收的Windows LAN状态字节(数据包)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要从C#或Java访问Windows中的LAN状态发送/接收字节(数据包)(请参阅页面上的第一张图片本地连接状态 - 创建快捷方式 - Windows 7帮助论坛 [ ^ ]) 。有没有图书馆或代码?



我尝试过:



我在网上找不到任何东西!

解决方案

使用System.Net.NetworkInformation.NetworkInterface [ ^ ]类找到相关的网络接口。称其 GetIPStatistics [ ^ ]获取 IPInterfaceStatistics [ ^ ]。您正在寻找的信息可在 BytesReceived [ ^ ]和 BytesSent [ ^ ]特性

Hi,

I need to access LAN status sent/received bytes (packets) in Windows from C# or Java (see first image at the page Local Area Connection Status - Create Shortcut - Windows 7 Help Forums[^] ). Is there any library or code available?

What I have tried:

I didn't found anything in internet !

解决方案

Use the System.Net.NetworkInformation.NetworkInterface[^] class to find the relevant network interface. Call its GetIPStatistics[^] method to get the IPInterfaceStatistics[^] for the interface. The information you're looking for is available in the BytesReceived[^] and BytesSent[^] properties.


这篇关于在C#或java中发送/接收的Windows LAN状态字节(数据包)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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