Thread Socket.pm (socketpair): bidirektionale Kommunikation (13 answers)
Opened by bloonix at 2006-05-31 16:49

bloonix
 2006-05-31 18:19
#66847 #66847
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Also select() ist ja so fein und gibt mir immer das letzte aktuelle
Handle zurück.

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
use Socket;

my ($kidfh, $dadfh);
socketpair($kidfh, $dadfh, AF_UNIX, SOCK_STREAM, PF_UNSPEC)
  or die "socketpair: $!";

my $oldfh;

$oldfh = select $kidfh;
print STDOUT $oldfh, "\n";
$oldfh = select $dadfh;
print STDOUT $oldfh, "\n";


Ausgabe:
main::STDOUT
GLOB(0x648290)


Aber wie kann ich das akutell verwendete Handle ohne select()
sichern?\n\n

<!--EDIT|opi|1149085232-->
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread Socket.pm (socketpair): bidirektionale Kommunikation