From: Suryanarayana G. <sur...@or...> - 2012-10-25 09:07:34
|
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 >> > |