Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: deal data transfer

by John M. Dlugosz (Monsignor)
on May 18, 2011 at 12:01 UTC ( [id://905464]=note: print w/replies, xml ) Need Help??


in reply to Re^2: deal data transfer
in thread deal data transfer

Maybe I misunderstood: you are not trying to design or invent a protocol, you are trying to write Perl code that uses a protocol that's already been defined?

Knowing when you have read enough data: you start reading what you have thus far. The length is defined by that, somehow. Is the length given first, followed by the data? Or is there a mark at the end? Or perhaps some of each?

To check the checksum, look up the protocol specification for the definition of that checksum. There are many ways to formulate such a value. You have to know how they are doing it, to match that.

Broken: depends on what you want to do, and perhaps the protocol definition. It might be designed as being intolerant of errors, such as the medical imaging protocols I've worked with. The specification defines what to do in such cases, going into an error state. Or, it might be like recieiving digital TV over the air, where it must be able to resync after an error so you get some static but then continue. The design of the data protocol facilitates this. So, what is the situation, and what are your requirements?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (9)
As of 2024-03-28 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found