簡體   English   中英

我如何將縱橫制客戶端(python3,asyncio)與tkinter集成

[英]How I can integrate crossbar client (python3,asyncio) with tkinter

我使用在asyncio事件循環中運行的crossbar運行程序來運行crossbar客戶端。 我想通過tkinter中的觸發器調用RPC。 有什么解決方案可以將它們組合在一起嗎?

您可以發出HTTP請求來調用您的RPC。 這里描述的所有內容都是Crossbar HTTP Bridge Caller 快速總結您需要做什么:

  1. 進行配置:

HTTP調用程序在Web傳輸的路徑上進行配置-這是Crossbar配置的一部分:

 { "workers": [ { "type": "router", ... "transports": [ { "type": "web", ... "paths": { ... "call": { "type": "caller", "realm": "realm1", "role": "anonymous" } } } ] } ] } 
  1. 在您的應用程序中發出HTTP請求

例如,使用curl:

curl -H "Content-Type: application/json" \
    -d '{"procedure": "com.example.add2", "args": [1, 2]}' \
    http://127.0.0.1:8080/call

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM