IiopVbServerBind Function

Action

Performs a UDP broadcast to locate a VisiBroker SmartAgent. When a SmartAgent is located, the function queries it for an object reference. Since a non-standard protocol is used to locate SmartAgents, the way that Silk Performer retrieves object references differs from the way that real VisiBroker clients behave.

Include file

IIOP.bdh

Syntax

IiopVbServerBind( inout hIiop       : number,
                  in    sInterface  : string,
                  in    sObjectName : string optional,
                  in    nPort       : number optional,
                  in    sHost       : string optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Variable that receives the handle of the CORBA object.
sInterface Repository ID of the object to be located.
sObjectName Name of the object to be located (optional). When this parameter is omitted, the function returns any object that has a matching interface.
nPort The port number where SmartAgent listens (optional). The default value is 14000.
sHost The host name where SmartAgent (osagent.exe) runs. When this parameter is specified, no broadcast is made, however the host is contacted directly (optional).

Example

dcltrans
  transaction TMain
  var
    hBankManager : number;
    hAccount     : number;
    fBalance     : float;
  begin
    IiopSetMaxGiopVersion("1.2");
    IiopSetByteOrder(IIOP_BIG_ENDIAN);
    IiopVbServerBind(hBankManager, "IDL:Bank/AccountManager:1.0", "Bank Manager");

    // open account
    IiopSetString(hBankManager, "Jack B. Quick");
    IiopRequest(hBankManager, "open", IIOP_RESPONSE_EXPECTED);

    // release IIOP object
    IiopObjectRelease(hBankManager);
  end TMain;

Sample scripts

AsyncFact.bdf, AsyncOdb.bdf, Conf.bdf, DynAny.bdf, Factory.bdf, Odb.bdf, Vbrokerbank01.bdf, Vbrokerbank02.bdf

You can find the sample script(s) here: <Public documents>\Silk Performer <version>\Samples\Corba