psmq_cleanup(3)
bofc manual pages
psmq_cleanup(3)
NAME
psmq_cleanup - cleans up whatever has been initialized by psmq_init(3).
SYNOPSIS
#include <psmq.h>
int psmq_cleanup(struct psmq *psmq)
DESCRIPTION
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.
RETURN VALUE
0 on success. -1 on errors with appropriate errno set.
ERRORS
- EINVAL
- psmq is NULL
- EBADF
- psmq object has no yet been initialized.
BUG REPORTING
Please, report all bugs to "Michał Łyszczek <michal.lyszczek@bofc.pl>"
SEE ALSO
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)
psmq_cleanup(3)