Dr. Broker: The executables (i.e., EXEs) you develop using Delphi and the RPC Broker are royalty and license free.
Dr. Broker: Source code for the the RPC Broker client is not distributed for security reasons.
Dr. Broker: Your workstation must have:
Dr. Broker: Use RpcbPropGet to querry the Connected property. Even though the application may try to set it to True, it remains False until an actual connection has been established and the user is authenticated.
Dr. Broker: Use RpcbPropGet to obtain property values at run time.
Dr. Broker: A single program may create as many Broker components as it needs. These Broker components may be used to establish multiple connections to different IP-ports at the same time. However, only one circuit is created for each unique IP-port and will be shared by all Broker components that "point" to it.
Dr. Broker: Yes.This version of the Broker (i.e., Broker V. 1.1) no longer requires you to pass one "dummy" parameter with the PType field of the Mult subproperty set to null.
Dr. Broker: The Broker uses a function call approach, only one
value or array is returned. The Param property is an array of parameters. Use
one Param element per parameter. If your aim is to pass two arrays to an RPC,
use Param[0] and Param[1], and set their PType fields to list.
Examples using the Param property:
RPCBroker1.Param[0].Value := '10/31/95'; RPCBroker1.Param[0].PType := literal; RPCBroker1.Param[1].Mult['"NAME"'] := 'SMITH, JOHN'; RPCBroker1.Param[1].Mult['"SSN"'] := '123-45-6789'; RPCBroker1.Param[1].PType := list; |
Dr. Broker: The Connected property gives you full control in connecting and disconnecting from the server. It can also be used to tell if the TRPCBroker component is currently connected or not. The Broker also automatically connects when any call method (Call, lstCall, strCall) is executed. The connection is maintained until the Connected property is set to False or until the TRPCBroker component is destroyed.
You should call the Broker's GetServerInfo function before any part of your code that establishes a connection can execute. GetServerInfo reads this information from the workstation, providing the appropriate Server and ListenerPort the TRPCBroker component should connect to. A good place to call GetServerInfo is your form's OnCreate event. Then, whether connection is established by setting Connected to True, or by executing a Call method, the TRPCBroker component knows the appropriate server to connect to.
Dr. Broker: The Broker uses three methods to invoke RPCs on a server:
All three methods rely on the Param property for the parameters. There are
two main differences between these methods. The first difference is that the
Call method is more versatile then strCall or lstCall. strCall can only be used
to return one string. lstCall can only return a list of strings. The Call method
can return either. The other difference is where the results of the calls are
placed.
The Call method uses the Results property for the return values. The
strCall method works like a function which can be assigned to some string-typed
variable. For example:
Patient.Name := strCall
lstCall puts the results of the call into the passed TStrings-typed variable:
lstCall(MyListBox.Items)
strCall and lstCall do not affect the Results property.
Dr. Broker: It is trapped using Kernel. The client is notified of the error via a popup window.
Dr. Broker: An M API has defined input and output values/parameters that are passed via the standard M invoking methods. An RPC, however, needs to do the following:
Thus, the RPC can be thought of as a wrapper placed around an API for use with client applications.
Dr. Broker: One strategy may be to label sections of the returning array as illustrated below:
Results[0] := '[[DATA]]' Results[1] := 'Some data' Results[2] := 'Some more data' Results[3] := '[[Errors]]' Results[4] := 'Error message' |
You loop through the array looking for your labels to indicate what data follows the label.
Dr. Broker: The Tag property is inherited from Delphi's
TComponent. The Tag property stores an integer value as a scratch value for use
by a component. While the Tag property has no meaning to Delphi, your
application can use this property to store a value for its special needs.
It is not related to the Tag field in the REMOTE PROCEDURE file
(#8994).
Dr. Broker: A Broker "B" type option can not be run from the menu system. You should instead build a new option for the Broker version of the application.