How get Navision Named Pipe Server side waiting.

How can I have a codeunit with a Named Pipe Bus Adapter Server Side waiting for an event (received message) ?. It is possible a real event, not a timer ? Can I process the event and let the codeunit waiting again like a daemon ? The scenario is a webpage that needs to obtain information of an execution of a codeunit. Thanks