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.