获取远程计算机的Web使用详细信息 [英] Getting a remote computer's Web usage details

查看:66
本文介绍了获取远程计算机的Web使用详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

作为我的最后一个项目,我正在使用C#实现网络管理软件.我想添加一个软件组件,该组件可以获取远程计算机(在LAN内)的Web使用情况统计信息.

我知道可以使用代理完成此操作,但是我想在我的软件中执行.

谁能告诉我这是可能的,我如何获得这些Web使用统计信息(如访问的URL,持续时间等)

谢谢.

Hi all,

I am implementing a network management software using C#, as my final year project. I want to add a software component which can get the Web usage statistics of a remote computer (within the LAN).

I know that this can be done using a proxy, but I want to do it in my software.

Can anyone tell me that is this possible and how can I get these Web usage statistics (like visited URLs, duration etc)

Thank you.

推荐答案

除非远程计算机上有网络服务,否则远程计算机不会向您报告任何内容.您是否认为可以访问要从中收集统计信息的计算机?如果是这样,我建议您应该在网络的每台计算机上创建一些运行的服务.如果他们使用的是Windows,则应使用网络Windows服务;否则,应使用Windows Service.如果您有其他平台,则此组件将是特定于平台的(恶魔之类的东西),但是您可以为该软件的核心使用通用的源代码.

我还建议您不要呆在纯粹的客户端服务器上,而应使用控制反转( http ://en.wikipedia.org/wiki/Inversion_of_control [ ^ ], http://en.wikipedia.org/wiki/Dependency_inversion_principle [来自同一端口号的多个客户端 [通过服务器触发的自动更新程序 [
The remote computer will not report anything to you unless you have a network service on that remote computer to do so. Do you assume you can get an access to the computers you want to collect statistics from? If so, I would suggest you should create some service running on every computer of your network. If they are using Windows, it should be a network Windows Service; if you have other platforms, this component will be platform-specific (a demon or something), but you can have a common source code for the core of this software.

I would also suggest you don''t stay with pure client-server, but apply inversion of control (http://en.wikipedia.org/wiki/Inversion_of_control[^], http://en.wikipedia.org/wiki/Dependency_inversion_principle[^]) and devise some subscription-based schema. It can be easily implemented at the level of TCP sockets. When a client is connected and a TCP session is created, it performs the an authentication and is added to a collection of subscribers by the service. It needs at least two separate threads on server side: one listening for a new connection, another one reading/writing to/from network stream, supporting some application-level protocol to exchange with each client represented by a remote socket in a subscriber''s collection. You will need thread inter-locking to share this collection between thread in a thread-safe way. The system should support non-graceful disconnection, is a connection is broken from ether side; this can be achieved by handling network exceptions; the remote socket should be removed from the collection of such exception.

Please see my past solutions for further detail:
Multple clients from same port Number[^],
automatic updater triggered via server[^].

—SA


这篇关于获取远程计算机的Web使用详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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