in reply to Interprocess communication in windows xp
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Interprocess communication in windows xp
by neha16 (Initiate) on Apr 13, 2012 at 12:45 UTC | |
by BrowserUk (Patriarch) on Apr 13, 2012 at 13:33 UTC | |
by halfcountplus (Hermit) on Apr 13, 2012 at 13:09 UTC | |
by eyepopslikeamosquito (Archbishop) on Apr 13, 2012 at 13:01 UTC |