远程枚举 BITS 作业(后台智能传输服务)
我使用 C# 包装程序 SharpBITS 作为通过 HTTP 下载文件的方法。但是,我想知道是否可以从 Web 服务器而不是客户端枚举当前下载的 BITS 事务。
I'm using the c# wrapper sharpBITS as a means to download files via HTTP. However, I was wondering whether it would be possible enumerate the current downloading BITS transactions from the web server, rather than the client.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题是模棱两可的,但我认为答案是“不”。 BITS 是一个客户端组件,每个本地用户帐户都有自己的一组作业。您最多可以找到(在客户端上运行)本地安装的 BITS 服务代表当前用户下载的文件。
找出服务器正在传送的文件列表(传送给一个特定客户端,或同时传送给所有客户端)将取决于 Web(或 FTP)服务器软件(Apache、IIS、lighttpd 等)和操作系统(Linux、 Windows、Mac OS X 服务器等)。
远程枚举它们(例如,在服务器上,列出特定客户端的下载;或者在客户端上,列出特定服务器正在传输的文件)在大多数情况下需要自定义协议来将信息从服务器传输到客户端(或反之)反之亦然)。在某些情况下,该软件可能已经具有可以使用的远程管理 API;同样,这在很大程度上取决于特定的服务器环境。
如果问题弄清楚了,可能就更容易回答了。例如,假设客户端 C1 正在分别从服务器 S1、S2 和 S3 下载文件 A、B 和 C;同时,服务器 S1 分别向客户端 C1、C2 和 C3 提供文件 A、D 和 E。您是否希望获取 C1 正在下载或 S1 提供的文件列表?您希望通过在 C1 或 S1 上运行的代码来获取这些信息吗?
The question is ambiguous, but I think the answer is "no". BITS is a client-side component and each local user account has its own set of jobs. The most you can find out (running on the client) is the files the locally-installed BITS service is downloading on behalf of the current user.
Finding out the list of files that the server is delivering (to one specific client, or all clients simultaneously) would depend on both the web (or FTP) server software (Apache, IIS, lighttpd, etc.) and the OS (Linux, Windows, Mac OS X Server, etc.).
Remotely enumerating them (e.g., on the server, listing a particular client's downloads; or, on the client, listing files being transferred by a particular server) would in most cases require a custom protocol to transmit the information from server to client (or vice versa). In some cases, the software may already have a remote management API that could be used; again, this would depend very heavily on the specific server environment.
If the question were clarified, it might be easier to answer. For example, suppose client C1 is downloading files A, B, and C from servers S1, S2, and S3 (respectively); meanwhile server S1 is serving files A, D, and E to clients C1, C2, and C3 (respectively). Do you wish to get the list of files being downloaded by C1, or served by S1? And do you want to have this information obtained by code running on C1 or S1?