larksuite / larksuite/oapi-sdk-java
关于使用长连接的情况下,关闭Socket
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 310
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
我司有个场景,需要可以在页面通过配置的形式接入飞书机器人,并且采用长连接的方式监听推送过来的事件消息,所以涉及到以下问题:
- 首次创建时,需要构建ws.Client,并start
- 编辑时,需要先把原来的ws.Client进行reconnect,即先disconnect,再start
- 删除时,需要把原来的ws.Client进行disconnect,并置空
对于以上3点,1已经实现,2和3存在问题:
- ws.Client有start、disconnect、reconnect三个方法,但是disconnect、reconnect这两个方法被protected修饰了,外部无法调用
请问一下:
能够将上述两个方法也变成public,如果不可以,还方便描述一下原因。谢谢
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating ws.Client and reviewing the visibility of its start, disconnect, and reconnect methods. Compare the requested edit and deletion lifecycle in the issue with the current public API. Done means callers can perform the required disconnect/reconnect operations externally, with the behavior confirmed by the project’s existing checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100