For tcp/ip sockets, use: IO::Socket::INET

2."The address of the destination in network-byte order", 3."The port of the destination in host-byte order"

You won't need to worry about byte order in perl. In fact, you don't even need to use a numerical address; if it is all on one machine, just use 'localhost'.

One of the programs will act as a server, the other will act as a client. If you say a little more about the nature and purpose of the communication, someone can give you an opinion about which should be which. You may also want to consider UDP sockets instead of TCP (in which case there is no client server relationship); I have not done this specifically in perl but it works very well for localhost applications, and there is Net::UDP.

One probably issue will be the need to thread the socket with the GUI, or use some kind of event driven model, since (generally) the socket and the interface need to make themselves available simultaneously. I don't think the Tk module alone has facilities for this.

I am totally unaware whether this is simple task or complicated.

If you haven't done it before and you have to deal with the concurrency issue, don't expect to get it done today. ;) You might want to tackle this by first coming up with a model for the socket communication outside the context of your GUI app, then thinking about how to incorporate it.


In reply to Re: Interprocess communication in windows xp by halfcountplus
in thread Interprocess communication in windows xp by neha16

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.