connect () generates (ResultStatus status, IConnection connection, int64_t connectionId, fmq_sync<BufferStatusMessage> mqDesc)
Registers a new client and creates IConnection to the buffer pool for the client.IConnection and FMQ are used by IClientManager in order to communicate with the buffer pool.Via FMQ IClientManager sends BufferStatusMesage(s)to the buffer pool.
FMQ is used to send buffer ownership status changes to a buffer pool from a buffer pool client.A buffer pool synchronizes FMQ messages when there is a hidl request from the clients.Every client has its own connection and FMQ to communicate with the buffer pool.So sending an FMQ message on behalf of other clients is not possible.
FMQ messages are sent when a buffer is acquired or released.Also, FMQ messages are sent when a buffer is transferred from a client to another client.FMQ has its own ID from a buffer pool.A client is specified with the ID.
To transfer a buffer, a sender must send an FMQ message.The message must include a receiver's ID and a transaction ID.A receiver must send the transaction ID to fetch a buffer from a buffer pool.Since the sender already registered the receiver via an FMQ message, The buffer pool must verify the receiver with the transaction ID.In order to prevent faking a receiver, a connection to a buffer pool from client is made and kept private.Also part of transaction ID is a sender ID in order to prevent fake transactions from other clients.This must be verified with an FMQ message from a buffer pool.