Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^5: Socket client thread design problem

by BrowserUk (Pope)
on Mar 24, 2014 at 23:35 UTC ( #1079609=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Socket client thread design problem
in thread Socket client thread design problem

If the hardware is capable fo supporting multiple concurrent connections; then I would suggest using two different connections.

One in a separate, library created thread for the blocking read to receive the hardware-initiated timed and/or event-driven packets.

And the other for client-code initiated, synchronous query/reply transactions.

If the hardware is unable to support two concurrent connections; then I would go for a separate thread with a non-blocking socket and running a typical select with timeout server that checks a queue for pending queries each time the recv timeout expires.


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".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^5: Socket client thread design problem

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-09-20 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (163 votes), past polls