I need to create a client-server model which are connected through Unix socket. My client will request the server to open a file for which only server has the permissions. Server will open the file and send the FD using "sendmsg" API and client will receive the FD using the "recvmsg". Now my question is can I achieve this using the non-blocking socket? Also if it is possible, how do I know the length of message on client side?
Please point me to some non-blocking implementation of the same.