bofc manual pages
psmq_cleanup - cleans up whatever has been initialized by psmq_init(3).
int psmq_cleanup(struct psmq *psmq)
Sends close message to the broker and closes message queues associated with the client.
It is important to call this if you are done with the broker. If you close application without calling this, you will make sort of a memory leak, since broker will still have opened connection with that client and you can use up all of broker's slot for new connections, and then broker will refuse any new conneciton. Only way to close it is to call this function before losing psmq object.
0 on success. -1 on errors with appropriate errno set.
- psmq is NULL
- psmq object has no yet been initialized.
Please, report all bugs to "Michał Łyszczek <firstname.lastname@example.org>"
psmqd(1), psmq-pub(1), psmq-sub(1), psmq_cleanup(3), psmq_init(3), psmq_publish(3), psmq_receive(3), psmq_subscribe(3), psmq_timedreceive(3), psmq_timedreceive_ms(3), psmq_unsubscribe(3), psmq_building(7), psmq_overview(7).
19 May 2021 (v9999)