Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

External Connect & Broadcast

I have got it connecting and talking between instances using the DirectConnect control.

Just wondering if and how it is possible to connect and broadcast a message from an external TCP connection instead of via the control to all the instances? thanks.

Comments

  • Hi Aaron,

    If I understand you correctly, you are looking for a way to interact with the SRP Sync Server from a non-OpenInsight client so that it will broadcast to all of the connected OI interfaces. Is that correct?

    If so, then the answer is that this utility isn't designed to handle connections from anything other that the SRP DirectConnect or SRP Schedule controls. There is, however, an indirect way to accomplish this.

    The SRP DirectConnect control has a non-GUI ProgID: SRP.DirectConnectSync. You can use this in a BASIC+ procedure via the native COM functions like so:

    IP = '127.0.0.1' Port = 25000 obj = OLECreateInstance('SRP.DirectConnectSync') status = OLEStatus() If Not(Status) then rv = OLECallMethod(obj, 'Broadcast', IP, Port, 'This is a test...this is only a test.') status = OLEStatus() end

    So you can use this within a headless engine call, perhaps one that is managed via the Socket Server or the OECGI.
  • perfect, that should do the trick for now, I needed it to be able to run from the engine server as it was more for an engine picking up an invoice and alerting client instead of polling for new invoices and updating some dash stuff etc when stuff is processed online, but would have needed the ole control to achieve, will test this.

    thanks.
Sign In or Register to comment.