Boost Message Queue not based on POSIX message queue? Impossible to select(2)?

后端 未结 2 1006
星月不相逢
星月不相逢 2021-02-15 12:30

I thought I\'d use Boost.Interprocess\'s Message Queue in place of sockets for communication within one host. But after digging into it, it seems that this library for some rea

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-15 13:12

    Yeah, unfortunately it doesn't. I also was disappointed when realize that after digging sources.

    But here is other (good) side of this fact: if your program uses boost::asio, you may wrap POSIX message queues API as just another datagram data source and this (IMHO) would be even better to use if it were a part of boost::interprocess... it would be quite non trivial, but (IMHO) definitely deserves this, so you may work w/ MQ in a unified way and use power of other boost::asio stuff...

    ... in my next project if I would need POSIX MQ again, I'll definitely take this way :)

提交回复
热议问题