Yes, also tried this.
No success: "Undefined subroutine &main::socketpair called"
| [reply] |
sub notxs {
my $Rdr;
my $Wt;
use Socket;
socketpair($Rdr, $Wtr, AF_UNIX, SOCK_STREAM, PF_UNSPEC);
return $Rdr, $Wtr;
}
| [reply] [d/l] |
Ok, then just calling socketpair() looks good for me.
One problem is that after this my XS function should return perl handle to the user, so he can call syswrite() on it. What I can't understand now is how to turn fd returned by socketpair() into GLOB from XS code. Any suggestions?
| [reply] |