donn:
wait_for_object()
is the sort of function that of its very nature can be implemented for Haiku only. It’s a bridge between the various I/O event types that can occur on the platform, including platform dependent ones. If you’re writing an application that has no Haiku API components, then you don’t need it. If your application’s socket thread only needs to hear from other threads under very simple and restricted circumstances, maybe you don’t need it, since I suppose you could equally well have it open a second socket for internal communications. But this is apparently what that function is for, and why I believe the Microsoft API has a similar function. It’s far more convenient and general to allow the “socket” thread to receive messages on its message port like any other thread.
Unfortunately wait_for_object()
is an experimental Haiku feature, so there is currently no guarantee that this function and associated structures will remain as they are in subsequent versions, or indeed from one day to the next.