且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将我的 Django 应用程序与 TCP 端口上的传入数据连接起来

更新时间:2023-01-28 11:12:42

您可能必须侦听来自另一个进程或线程的端口.将传入的数据保存在某处,无论是日志文件、数据库还是其他任何内容.然后让 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.