Difference between revisions of "RPC HELP TRPCBroker Socket Example"
From VistApedia
(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...") |
|||
Line 8: | Line 8: | ||
'''begin''' | '''begin''' | ||
Result := 0; | Result := 0; | ||
− | '''if''' Assigned(BrokerConnections) and | + | '''if''' Assigned(BrokerConnections) '''and''' |
BrokerConnections.Find(Broker.Server + ':' + IntToStr(Broker.ListenerPort), Index) '''then''' | BrokerConnections.Find(Broker.Server + ':' + IntToStr(Broker.ListenerPort), Index) '''then''' | ||
Result := TRPCBroker(BrokerConnections.Objects[Index]).Socket; | Result := TRPCBroker(BrokerConnections.Objects[Index]).Socket; | ||
'''end;''' | '''end;''' |
Latest revision as of 20:35, 4 July 2015
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;