如何将块中的字节传输到客户端? [英] How can I transfer bytes in chunks to clients?

查看:81
本文介绍了如何将块中的字节传输到客户端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SignalR丢失了很多消息.

我将文件读入流中,并通过集线器或与其他客户端的持久连接发送.这运行得非常快,但是总会有消息丢失或丢失.

I read the file into a stream and sent it over a hub or persistent connection to other client. This runs very fast, but there are always messages dropped or lost.

如何在不丢失消息的情况下从一个客户端到另一个客户端传输大文件(成块或不成块)?

How can I transfer large files (in chunks or not) from client to client without losing messages?

推荐答案

正如@dfowler指出的那样,这不是适合这项工作的技术.我建议做的是发送一条消息,提示要下载的文件包含链接,然后可以使用标准GET请求针对静态文件或某些用ASP.NET WebAPI编写的Web服务下载该文件.

As @dfowler points out, it's not the right technology for the job. What I would recommend doing is sending a message that there is a file to be downloaded that includes the link and then you can download that file using standard GET requests against either static files or some web service written with ASP.NET WebAPI.

这篇关于如何将块中的字节传输到客户端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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