in reply to Re^5: Perl an array of sockets
in thread Perl an array of sockets

As for the authentication, is just a test, the code would be inside some Oracle APEX and we are testing

One last thing, instead of using an array I would rather use a hash to test is a user is logged in before sending,

$users{$uexten}=$cgi->{websocket};

but an error ocurrs, like the socket is not being push into users

for my $a ( keys %users ) { print "send to extension: $a "; my $sck=$users{$a}; $sck->queue_msg("evento llamada $exten\n"); } ....... EV: error in callback (ignoring): Can't call method "queue_msg" on an +undefined value at server16.pl line 86

Replies are listed 'Best First'.
Re^7: Perl an array of sockets
by suhijo (Novice) on Nov 21, 2017 at 20:58 UTC
    Nevermind my friend... for some reason the hash had a the top a "blank reference" and the queue_msg got error and block. I was this %users ={};. Thank you so much