Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Reply to TCP messages Net::Server::PreFork

by sflitman (Hermit)
on Oct 07, 2010 at 05:46 UTC ( #863910=note: print w/ replies, xml ) Need Help??


in reply to Reply to TCP messages Net::Server::PreFork

I'd try setting $/ to the ; at the end, see if that terminates a call to readline:

... local $/=';'; while (defined($buf=$sock->getline)) { # parse $buf here } ...
HTH,
SSF


Comment on Re: Reply to TCP messages Net::Server::PreFork
Download Code
Re^2: Reply to TCP messages Net::Server::PreFork
by diazocon (Initiate) on Oct 07, 2010 at 15:06 UTC
    Hi SSF, It didn't work, it still waits for newline to parse get the imput. Is there anyway to get the contents of the buffer after a specific timeout? that way I could just process the contents of $buf wheater is a 96 byte string or the other format. Thanks! Carlos
      hi.. i am in the same stuff, but different issue. to solve your problem i use "IO::Handle->input_record_separator(')');" it helps me to separate each gps records. it works fine. i cant get "Net::Server::PreFork;" work yeat.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2015-07-03 20:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls