在 LLCP 中,有 2 种传输方式:
- 面向连接
- 无连接
有人知道哪种 LLCP 传输与以下组合使用:
- 核电厂
- SNEP
NPP 只是 1-way,所以它可能因为确认而与面向连接的结合,但我不知道。SNEP 有这个确认来确认收到的包,所以也许它与无连接 LLCP 结合以避免冗余,但我不确定。
我希望你能帮助我,谢谢!
我在 Google 的 Source Code 的文件 target.c 中找到了以下内容:
/*
* Services a LLCP conversation with a BEAM device, such as Android ICS, or
* an NPP device, such as Android GB. First attempts to connect on well known
* SNEP service. If that request is denied, connects to the NPP service by
* name. Once connected, sends the NDEF record via the available protocol.
*
* LLCP is a connection oriented protocol. The state is managed by llcp.c.
* The basic flow is as follows:
* 1) Connect on SNEP service (4)
* 2) If fails, connect on NPP service by name
* 3) Once connected, send payload via SNEP or NPP
* 4) If SNEP, wait for acknowledgment (NPP does not ackonwledge)
* 5) Disconnect
*
* Arguments:
* resp - Buffer to be reused to receive LLCP commands
* resp_len - Size of resp in bytes
* ndef - Data to send to peer, e.g. a NDEF record
* ndef_len - Length of payload in bytes
*
* Returns:
* true if all data was passed to peer, false on error or timeout
*/
NPP 和 SNEP 都使用了面向连接的 LLCP 通道