如何将我的 Django 应用程序与 TCP 端口上的传入数据连接起来 [英] How to Connect My Django App with incoming data on a TCP Port

查看:57
本文介绍了如何将我的 Django 应用程序与 TCP 端口上的传入数据连接起来的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 django URL 连接到 TCP/IP 端口上的传入数据.如果有人可以对此有所了解,那就太好了

I am trying to connect a django URL to incoming data on TCP/IP Port. It would be great if someone, could shed some light on this

推荐答案

您可能必须侦听来自另一个进程或线程的端口.将传入的数据保存在某处,无论是日志文件、数据库还是其他任何内容.然后让 Django 在准备网页以响应 URL 上的请求时使用这些数据.

You'll probably have to listen on the port from another process, or thread. Save the incoming data somewhere, whether it be a log file, database, or whatever. Then have Django use this data when it prepares the web page to send in response to requests on the URL.

这篇关于如何将我的 Django 应用程序与 TCP 端口上的传入数据连接起来的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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