Boost::asio - how to interrupt a blocked tcp server thread?

后端 未结 5 518
野的像风
野的像风 2020-11-30 04:17

I\'m working on a multithreaded application in which one thread acts as a tcp server which receives commands from a client. The thread uses a Boost socket and acceptor to w

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 04:49

    If it comes to it, you could open a temporary client connection to it on localhost - that will wake it up. You could even send it a special message so that you can shut down your server from the pub - there should be an app for that:)

提交回复
热议问题