[英]How to use UDP to send data to client in Django?
I have read that Django uses HTTP request response architecture to process user requests.我读过 Django 使用 HTTP 请求响应架构来处理用户请求。 And we all know HTTP is an application layer protocol designed within the framework of the Internet protocol suite.并且我们都知道HTTP是在Internet协议套件的框架内设计的应用层协议。 Its definition presumes an underlying and reliable transport layer protocol, and Transmission Control Protocol (TCP).它的定义假定了一个底层和可靠的传输层协议,以及传输控制协议 (TCP)。 So my question is if django uses tcp to establish connection and suppose I want to serve videos or some other file using UDP.所以我的问题是 django 是否使用 tcp 建立连接并假设我想使用 UDP 提供视频或其他一些文件。 How can I achieve this?我怎样才能做到这一点?
You Can Use Django Channels with WebRTC ( RFC Here ) And Provide Real Time Communications Over TCP via Channels Package there are many useful sources to achieve.您可以将 Django Channels 与 WebRTC(此处为RFC )一起使用,并通过 Channels Package 通过 TCP 提供实时通信,有许多有用的来源可以实现。 and also you can implement a microservice architecture to serve videos or some other file using UDP Like Node.js Server or etc.并且您还可以实现微服务架构以使用 UDP 像 Node.js 服务器等来提供视频或其他文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.