Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: UDP socket: Operation not supported

by edan (Curate)
on Dec 20, 2004 at 07:38 UTC ( #416123=note: print w/ replies, xml ) Need Help??


in reply to UDP socket: Operation not supported

You can't "Listen" on UDP sockets, only TCP, since UDP is a connectionless protocol - it's a message-passing protocol. If you drop the "Listen" parameter to the new(), you'll find that you'll be able to create the socket. You'll then want to call $sock->recv() (with the appropriate arguments), which will block until you receive a message...

HTH

--
edan


Comment on Re: UDP socket: Operation not supported
Download Code
Re^2: UDP socket: Operation not supported
by chrism01 (Friar) on Dec 21, 2004 at 01:58 UTC
    Thx: worked a treat on my RH FC3, but tgt is FreeBSD 5.3-RELEASE-p2, which came up with:
    Can't make server listen socket : IO::Socket::INET: Can't assign requested address
    any ideas?

      This doesn't have anything to do with the operating system. It means you are trying to bind to a local IP address that isn't found on any interface on the host. Did you change the

      LocalAddr => 'a.b.c.d'
      argument to an appropriate local address on the FreeBSD box, or are you trying to bind to the address on the RH box? Do you really care which address you bind to locally? You could just leave this argument out to bind to '*' - that would make life easier...

      --
      edan

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://416123]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-12-28 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls