Thanks for the suggestion. Have not used POE before (but have read a bit about it in Simon Cozens book "Advanced Perl Programming") so will pass it for now, in favour of a simple Dancer function that hands out sockets to requestors. This function keeps track of which socket belongs to which requestor using a hash whose keys are session ids. If the session id is a key in the hash it just hands out the corresponding socket, if not it creates a new one, records it in the hash and hands it out. Since I run the Dancer app under Starman, I believe the handed sockets would be persistent.
Would POE give me a more robust solution than this obviously simplistic method? If yes, I would love to give it a go.
In reply to Re^8: Creating Socket Connections that are persistent across multiple page loads in a single web session
by unlinker
in thread Creating Socket Connections that are persistent across multiple page loads in a single web session
by unlinker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |