sbrandt has asked for the wisdom of the Perl Monks concerning the following question:
$sock_r = IO::Socket::INET->new(Proto => "udp", Reuse => '1', TimeOut => 10) or die "can't connect socket $!"; #$host_port = unpack_sockaddr_in($sock_r); #$host_port = sockaddr_in($sock_r->sockport); #$host_port = getsockname($sock_r->sockaddr); #($host_port, $host_ip) = unpack_sockaddr_in($sock_r->sockaddr +, AF_INET);
2. How do I send binary data thru a UDP socket? Seems the default is ASCII, and I'd like to use UDP socket to exchange SIP protocol messages (which are binary).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: UDP socket questions
by jasonk (Parson) on Mar 13, 2003 at 17:09 UTC | |
by sbrandt (Initiate) on Mar 13, 2003 at 18:11 UTC | |
by traveler (Parson) on Mar 13, 2003 at 18:49 UTC | |
by pg (Canon) on Mar 13, 2003 at 20:24 UTC | |
by sbrandt (Initiate) on Mar 13, 2003 at 21:40 UTC |