Socketcand UNIX Socket Support
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 58/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- networking
研究方向
從 can/interfaces/socketcand/socketcand.py 中的 SocketCanDaemonBus 開始,檢查第 47 行附近現有的 socket 設定。在保留 host/port 行為的同時,新增對可選 UNIX socket 路徑的支援;當 bus 可以使用該路徑進行連線而不需要 host 或 port 時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Is your feature request related to a problem? Please describe.
I am working with CAN bus in Docker containers. I personally find it more reliable to pass a UNIX socket path from the host to a container than it is to use host.containers.internal or whatever they call it these days. Socketcand natively supports binding to a UNIX socket, but there is no API to connect to it via python-can.
Describe the solution you'd like
An additional argument to SocketCanDaemonBus that allows specifying a socket path. When passed, it should allow for the host and port to be empty, and should change socket.AF_INET to socket.AF_UNIX on this line. The socket path should be passed to socket.connect() without the port.
Describe alternatives you've considered
I have tried long and hard to get communication working via standard TCP/IP but it just seems to hate me. This seems like the next best option, and I think it should be supported since it's a core feature of Socketcand :)
- 主要語言
- Python
- 星號
- 1.6k
- 分支
- 697
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hardbyte/python-can 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 88/100
hardbyte/python-can#2103 ·
-
bug
難度 1/5 1 小時以內 新手友好度 78/100
hardbyte/python-can#2077 · 1 則留言 · 1 個 reaction ·
-
bug
難度 1/5 1 小時以內 新手友好度 68/100
hardbyte/python-can#1922 · 1 個 reaction ·
-
enhancement
難度 5/5 一週以上 新手友好度 30/100
hardbyte/python-can#2102 ·
-
bug
難度 3/5 1-2 天 新手友好度 68/100
hardbyte/python-can#2092 ·
查看 hardbyte/python-can 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
難度 2/5 1-3 小時 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 1/5 1 小時以內 新手友好度 80/100
learningequality/kolibri#15351 · 2 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
Name consistency 未關閉
難度 2/5 1-3 小時 新手友好度 75/100
eellak/triplestore#65 · 1 則留言 ·