Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to shut down UNIX sockets?

by hnd (Scribe)
on Sep 01, 2009 at 19:06 UTC ( [id://792716]=note: print w/replies, xml ) Need Help??


in reply to How to shut down UNIX sockets?

i think what you want to do is: send one message and wait for the reply then again reply to reply received previously

you can use I/O multiplexing um.... that is to say you can use IO::Select module's can_read() and can_write() functions..... they check whether the socket is ready for reading or writing..... better than forking... check out the documentation of IO::Select here

=====================================================
i'am worst at what do best and for this gift i fell blessed...
i found it hard it's hard to find well whatever
NEVERMIND

Replies are listed 'Best First'.
Re^2: How to shut down UNIX sockets?
by bv (Friar) on Sep 01, 2009 at 19:19 UTC

    Yes, that's what I want to do generally, and I'm having a fair amount of trouble, but I'm not ready to ask for help yet. The problem I asked about was specifically whether IO::Socket::UNIX provides any clean way to exit such that it can start again without failing with EADDRINUSE. I could write the code to unlink the FIFOs if they exist, but then I have to worry about concurrency and so forth.

    print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972)))
      you can look at one of my meditations on chat server....
      and for cleaning the sockets, IO::Select provides the select() function that can specify what you want your socket to do....

      "keep it simple.... stupid :D"
      =====================================================
      i'am worst at what do best and for this gift i fell blessed...
      i found it hard it's hard to find well whatever
      NEVERMIND

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found