Sets up a callback to listen for incoming requests. Such requests are answered with a reply containing the parameters set on the object handle before calling the IiopObjectListen function. This function must be called for each operation that is supposed to be answered.
Optionally the callback can be re-routed to a native function exported by a so-called IIOP extension dll.
IIOP.bdh
IiopObjectListen( in hIiop : number, in sOperation : string, in sDllName : string optional, in sDllFunc : string optional ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
hIiop | Handle to a CORBA object. |
sOperation | Name of operation to be answered. |
sDllName | Name of the callback extension dll (optional). |
sDllFunc | Name of the native function that is called whenever a callback occurs (optional). |
const LOCALHOST := "192.55.21.188"; DAEMONPORT := 1570; REMOTEHOST := "192.55.21.192"; var ghDaemon, ghRemoteServer, ghCallback: number; dcltrans transaction TMain begin IiopSetMaxGiopVersion("1.2"); IiopSetByteOrder(IIOP_BIG_ENDIAN); ghDaemon := IiopOrbixDaemonBind(LOCALHOST, DAEMONPORT); ghRemoteServer := IiopOrbixServerBind(ghDaemon, REMOTEHOST, "remote", "", "remote"); // set up callback object IiopObjectCreate(ghCallback, "IDL:DemoObject:1.0", "1.2", LOCALHOST, 0, "\h3A5C6D69746368656C6C2E7365677565" "\h6175743A2D3838393233363930343A30" "\h3A3A4946523A6C6F63616C00"); IiopObjectSetInterface(ghCallback, "IDL:local:1.0"); IiopObjectListen(ghCallback, "callback_func"); IiopSetObject(ghRemoteServer, ghCallback); IiopRequest(ghRemoteServer, "func", IIOP_ONEWAY); // enable the user to answer callbacks. wait(20.0); IiopObjectRelease(ghRemoteServer); IiopObjectRelease(ghCallback); end TMain;
Callback.bdf
You can find the sample script(s) here: <Public documents>\Silk Performer <version>\Samples\Corba