Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Check connection state prior to send data

by Lucas Rey (Sexton)
on Sep 24, 2016 at 07:30 UTC ( [id://1172524]=note: print w/replies, xml ) Need Help??


in reply to Re: Check connection state prior to send data
in thread Check connection state prior to send data

Sorry, I don't wish to be controversial, but your reply sounds like: "check perlmonks for solution" :-)
  • Comment on Re^2: Check connection state prior to send data

Replies are listed 'Best First'.
Re^3: Check connection state prior to send data
by BrowserUk (Patriarch) on Sep 24, 2016 at 07:34 UTC

    You achieved your wish. That's not controversial.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Let me explain, I don't want that you (or other users) write the code for me, but before post to perlmonks I search around the net. So, I'm here because I cannot find anything. :-) What you link is an interesting start point, but I already checked these pages without find a solution to my issue! ;)

        If the socket is not connected, writing to it will return an error which you can then check. Usually, writing to a socket has a timeout which you cannot avoid due to the nature of TCP.

        Personally, I would look at AnyEvent or one of the other frameworks to handle non-blocking sockets.

        Maybe you can tell us what solutions you have looked at and where you have problems with them? If you want to roll your own solution, perlipc provides a good starting point IMO.

        What you link is an interesting start point, but I already checked these pages without find a solution to my issue!

        In what way is IO::Select::can_write( [ TIMEOUT ] ); not a solution to your issue?


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-23 23:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found