From: Jon P. M. <ma...@do...> - 2012-10-25 09:43:49
|
Forgot to do "reply all". ________________________________ De : Jon Paul Maloy <ma...@do...> À : Suryanarayana Garlapati <sur...@or...> Envoyé le : jeudi 25 octobre 2012 11h29 Objet : Re: [tipc-discussion] Query on PORT In the demo app (e.g. hello_world.c) there is a function called "wait_for_server" which is doing a blocking, synchronous call to the topology server and waits until the requested port is published. If you do something similar with a timeout value of 0 it will return immediately with the status of the port. Maybe what you are looking for? ///jon ________________________________ De : Suryanarayana Garlapati <sur...@or...> À : Erik Hugne <eri...@er...> Cc : tip...@li... Envoyé le : jeudi 25 octobre 2012 11h07 Objet : Re: [tipc-discussion] Query on PORT Hi Erik, Comments inline. Regards Surya On Thursday 25 October 2012 02:20 PM, Erik Hugne wrote: > You can subscribe for published names, but there's no API to query > specific ports. [Surya] My simple requirement is, if i have two processes A and B with one TIPC socket created in each process. A knows B port through other ways and B also knows A's as well. In some cases we want to query whether PORT of B process exists or not(similar is the case with the A as well). We can get it from the "tipc-config -nt", but i am interested in getting it programmatically. "getpeername" what is this mainly for? > > A "stupid" solution to check for local ports would be to call > tipc-config -p from your program with 'exec' and grep for the port > you're interested in... :) > > Can you explain why you need this? [Surya] In our product the processing of TIPC_WITHDRAWN events and message send to the same port are done in different threads. There may be a case where the send is attempted first(by this time already B has gone down), but the event is already present in TIPC WITHDRAWN still not processed. So in this case we want to avoid the sendto call as well. > Do you need to query ports on remote nodes? or only on the local node? [Surya] I would be interested in both. > > //E > > > On 10/25/2012 10:18 AM, Suryanarayana Garlapati wrote: >> Hi, >> In TIPC is there a API through which we can check for existence of a >> PORT? >> >> Regards >> Surya >> >> >> ------------------------------------------------------------------------------ >> >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_sfd2d_oct >> _______________________________________________ >> tipc-discussion mailing list >> tip...@li... >> https://lists.sourceforge.net/lists/listinfo/tipc-discussion >> > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ tipc-discussion mailing list tip...@li... https://lists.sourceforge.net/lists/listinfo/tipc-discussion |