lsongdev / lsongdev/node-bluetooth
How can I know if the connection is always open ?
还没有人认领这个 Issue。
- 主要语言
- C++
- 星标
- 205
- 派生
- 56
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi,
For beginning thank you for this node module :).
I have an electron program that open a bluetooth connection and listening the event "data".
How can I know if the connection is always open ?
Before write data I check if the connection is open with connection.isOpen() but this method return true if the connection has been open and lost.
I have try to listen the events "closed", "close", "failure" without any success.
If the connection has been open and lost, when I write data I have an uncatched exception:
Error : Error reading from connection.
The calls to the write method is in try/catch block
Node version : v8.12.0
node-bluetooth: v1.2.5
Thank you for your help.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定文件或测试。首先跟踪 node-bluetooth 中的 connection.isOpen()、连接丢失处理和写入路径,然后使用所述的 Node v8.12.0 和 node-bluetooth v1.2.5 版本重现故障。完成标准是:能够在写入前可靠地检测到连接已丢失,并且不会产生未捕获的错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- electron, node.js
- 领域
- embedded-iot, networking
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100