Hello,
I'm working on a library that is currently using standard tcp sockets. An end user of my library registers themselves as a listener, and needs to be notified if/when a relevant message comes in.
If I spawn a worker thread within my library, there is a thread-death problem where my library may prevent the application from terminating normally when all user-threads die.
Is there a way I can be notified of a new incoming tcp packet without spawning a new thread or requiring the user to poll the library?
Thanks!