In Perl, given two IO::Socket's how do I connect 1st socket's input to 2nd's output and vice versa?
Posted
by bodacydo
on Stack Overflow
See other posts from Stack Overflow
or by bodacydo
Published on 2010-05-06T17:20:52Z
Indexed on
2010/05/06
17:48 UTC
Read the original article
Hit count: 384
Suppose I have made two connections in Perl with the help of IO::Socket
. The first has socket $s1
and the second has socket $s2
.
Any ideas how can I connect them together so that whatever gets received from $s1
got sent to $s2
and whatever gets received from $s2
got sent to $s1
?
I can't understand how to do it. I don't know how to connect them together. I would expect to do something like $s1->stdin = $s2->stdout
and $s2->stdin = $s1->stdout
, but there are no such constructs in Perl.
Please help me!
Thanks, Boda Cydo.
© Stack Overflow or respective owner