RPC HELP TRPCBroker Socket Example

From VistApedia
Revision as of 20:35, 4 July 2015 by Kdtop (talk | contribs) (Created page with "<h2>Socket Example</h2> The following program code populates the Socket property with the active port on the VistA M Server: '''function''' ExistingSocket(Broker: TRPCBr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Socket Example

The following program code populates the Socket property with the active port on the VistA M Server:

   function ExistingSocket(Broker: TRPCBroker): integer;
   var
     Index: integer;
   begin
     Result := 0;
     if Assigned(BrokerConnections) and
       BrokerConnections.Find(Broker.Server + ':' + IntToStr(Broker.ListenerPort), Index) then
       Result := TRPCBroker(BrokerConnections.Objects[Index]).Socket;
   end;