Author Topic: limit on number of requests with one connector  (Read 6368 times)

s.kulku

  • Guest
limit on number of requests with one connector
« on: May 01, 2007, 02:54:01 AM »
Can more than one request be sent at the same time using protocol adapter?

Here is the standard way of sending data to t-server:

  Message request =
    RequestRegisterAddress.create(\"610\",
      RegisterMode.ModeShare,
      ControlMode.RegisterDefault,
      AddressType.DN
      );
 
  Message response = protocol.request(request);
  if(response.messageId() != EventRegistered.ID)
  {
    throw new Exception(\"Unexpected response to RequestRegisterAddress\");
  }
 
If I register 100 DNs with this protocol adapter, can the requests be sent through the same \"protocol\" by using other threads or do I need to send them one at a time?

I would hate to launch a new thread for each request, so can the response be received asynchronously?

Sanja Kulku
Technical Product Manager







Marked as best answer by on November 16, 2024, 06:26:57 AM

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7639
  • Karma: 56330
Re: limit on number of requests with one connector
« Reply #1 on: May 02, 2007, 03:57:46 PM »
  • Undo Best Answer
  • You do this:

    a.Connect to TServer
    b.Interact with TServer:
    1. Request Monitor of an Object (eg: extension) on a Tobject like a TExtension
    2. Begin to receive events on the object TExtension (Textension1, Textension2,....)
    3. React on this events
    c. While you don't lose connection to the TServer it will flow.

    You can register many objects but question will be why to monitor this many on only 1 app? What are you trying to develop?

    Offline René

    • Administrator
    • Hero Member
    • *****
    • Posts: 1832
    • Karma: 62
    Re: limit on number of requests with one connector
    « Reply #2 on: May 02, 2007, 04:56:54 PM »
    Hi Sanja,

    Please look at the Victor's post "Asynchronous Programming with SDK". I would say that it is what you're looking for.

    Cheers,
    René