I forget whether this was JACKS or SPIDB who did this, but it's
certainly an improvement.
Coupla questions:
1) How come pack_sockaddr_in and unpack_sockaddr_in rather
than what I had been using:
$paddr = sockaddr_in(AF_INET, $port, $iaddr);
($fam, $port, $iaddr) = sockaddr_in($paddr);
It's a very simple mod to Socket.xs for wantarray()ness.
2) Is there ever a case of using sockaddr_in (note the _in)
structure when you aren't using AF_INET? If not, this
would be simpler:
$paddr = sockaddr_in($port, $iaddr);
($port, $iaddr) = sockaddr_in($paddr);
Hm.. seems to me I've actually always used them this way:
$paddr = sockaddr_in($iaddr, $port);
($iaddr, $port) = sockaddr_in($paddr);
3) Is there any reason not to also do sockaddr_un()?
--tom
certainly an improvement.
Coupla questions:
1) How come pack_sockaddr_in and unpack_sockaddr_in rather
than what I had been using:
$paddr = sockaddr_in(AF_INET, $port, $iaddr);
($fam, $port, $iaddr) = sockaddr_in($paddr);
It's a very simple mod to Socket.xs for wantarray()ness.
2) Is there ever a case of using sockaddr_in (note the _in)
structure when you aren't using AF_INET? If not, this
would be simpler:
$paddr = sockaddr_in($port, $iaddr);
($port, $iaddr) = sockaddr_in($paddr);
Hm.. seems to me I've actually always used them this way:
$paddr = sockaddr_in($iaddr, $port);
($iaddr, $port) = sockaddr_in($paddr);
3) Is there any reason not to also do sockaddr_un()?
--tom