问题描述
我要建立连接后,从Wi-Fi直连组断开连接。我只是想默默搬出而不中断已经在与本集团所有者连接其他客户端。
I want to disconnect from a wifi direct group after establishing a connection. I just want to move out silently without interrupting other clients that are already in connection with the Group owner.
我使用 manager.Connect()方式建立连接。但没有看到任何的方法来断开连接。只有我看到了另一种选择就是 manager.removeGroup(),但我想这将删除整个组并中断现有的网络连接。
I use manager.Connect() method to establish a connection. But didnt see any methods to disconnect. Only other option i saw is manager.removeGroup(), but I guess this will remove the entire group and interrupt the existing network connection.
我怎样才能做到这正常吗?
How can I do this properly?
感谢
推荐答案
功能removeGroup的第一个参数()是一个通道。所以我觉得,如果这是由客户端发起,只有在客户端和组所有者之间的通道将被切断。
The first parameter of the function removeGroup() is a channel. So I think if this is initiated by a client, only the channel between the client and group owner will be disconnected.
这篇关于从Wi-Fi直连组断开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!