Can I use the socket that i created in one execution instance to communicate for the other execution instances
IMO it is not possible/not recommended for processes to share same socket handle(single IP and PORT)
Even though you try that, all instances writing to the same socket will be a mess; unless every request/response has a identification mechanism of itself(like sequence number).
but your problem can be solved using other ways.
if you really want to use only one socket, have one dedicated program for socket connection in the client side(which would always be running) which sends and receives data from server, all other your IVR instances can use a Message queue or a shared memory mechanism to connect with this dedicated socket program to send/receive data.
The above idea brings more complexity to your code, you have to craft it properly. But one common solution is, let all the instances create its own socket, the memory that is going to be used for socket creation is very minimum, the number of socket connections per system also can be tuned(increased/decreased).

Vivek
-- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.

In reply to Re^3: How to reuse a Soket and how it will work by targetsmart
in thread How to reuse a Soket and how it will work by madhu.hanigadde

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.