Actually, I was investigating whether we can use specifiers, that little used scripting feature. So we might be able to use a fancy existing feature of messaging
But if that doesn’t work out, option 3 would look like
- Give me a connection – we create a new port
- Thanks! I’ll send that off to the other process. – it sends the port number to the other process
- Ok, now create the
BLooper
andBHandler
to receive those messages – we create a newBLooper
that reads messages sent to that port.
This would require us to do two or so things:
- Make a private
BLooper
method public.
We needBLooper(int32 priority, port_id port, const char* name);
, which creates aBLooper
that reads from an existing port. - Make a way to create a
BMessenger
that points directly to a port.