|Pathologically Eclectic Rubbish Lister|
Checking if a socket has some data to readby perlgsm (Initiate)
|on Jun 13, 2013 at 16:17 UTC||Need Help??|
perlgsm has asked for the
wisdom of the Perl Monks concerning the following question:
I am using 'Net::SMPP' to have a transceiver SMPP connection(tcp) to exchange some SMSs.
The read_pdu() function offered by the library blocks until some data is available. In order to fix this I'm using IO::Select->can_read() to check if some data is available of the wire, so that I can execute the read_pdu to actually read the data.
The problem is can_read is always returning an undef, I tried many tricks and methods, but none have worked.
I'm attaching my code here.
Any idea would be highly appreciated.
Many thanks, perlgsm