in reply to Re^3: sockets and such in Perl
in thread sockets and such in Perl
Sorry for the confusion (see my UPDATED example in the original reply).
The following section was taken from an example I found online:
If it's unnecessary I can take it out - it worked so I didn't mess with it. What was the original purpose behind this "scalar" anyways?print $s_socket "$match\n"; print scalar <$s_socket>;
Regarding the example you provided me, I have one primary question:
If I use a single socket for two different clients, can I still distinguish between which client I am connected to? What if my Third process connects to $conn1, and my First to $conn3 just by the order in which they happen to reach the Second process?
Is it better to setup individual ports/connections/sockets for two different clients, and then use those individual ports in a bidirectional manner?
One other thing I'd like to ask: Given that these processes will likely all be on the same machine - is there a better means of IPC to use other than sockets?
Sorry again about mangled code - I've been up for awhile:)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: sockets and such in Perl
by polettix (Vicar) on Jul 04, 2005 at 10:06 UTC |