Generally speaking, your idea would fly. (It is not clear to me whether your main concern is that you used different languages at different nodes. that should be okay, TCP itself has nothing to do with programming language)
I once did something called message router, which is a set of libraries for a private user level protocol used in my shop. The library has three versions, one in Perl, one in c, and one in java, so all the other programmers in my shop can call it, doesn't matter whether he/she is a Perl/c/Java programmer.
Those libraries worked fine.
In your case, I suspect that it might be better if you create one more level of abstraction on top of TCP, to handle your user level message routing. Not sure, depends on your requirement, what I said is just my experience and my solution at that time.
As for IO::Socket::INET, it is just fine, that was what I used.
If you ask me to revisit it again today, considering the tech progress people made between then and today, I might like to study Java Messaging a little bit, if Perl is not a must. That might help avoiding reinvent the wheel, and gain a more sophisticated solution.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.