hramenko / bauglir-websocket

Automatically exported from code.google.com/p/bauglir-websocket
0 stars 0 forks source link

Implement full data processing mode #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Data are processed once they are complete in most applications. Framing must be 
reimplemented by connection descendant class to concanate incoming data and 
process those / fire event once final frame is received.

Mechanism for processing full data should be implemented.

Original issue reported on code.google.com by Bronisla...@bauglir.com on 11 Jan 2012 at 8:00

GoogleCodeExporter commented 9 years ago
implemented in 2.0.3

such behavior is not always preferred, in some situation framing is used for 
continuous data streaming. All previous functionality is kept (implementation 
is backward compatible). 

FullDataProcess property is introduced (defaults to false). If set to true, 
incoming data are concanated until final frame is received if necessary (if 
first frame if final as well, such frame constitutes full data, otherwise data 
starts with text or binary regular frame and continuous frames are appended 
until final one, and then the process starts all over again).
Be aware of data size, in case of e.g. sending movie in frames, this 
functionality is not preferred, because all data are kept in memory until final 
frame).

New event OnReadFull (Pascal) or ConnectionReadFull (C#) and new protected 
methods ProcessStreamFull, ProcessTextFull are introduced. Those are called 
only if FullDataProcess is true. One can implement those methods and ignore 
framing on incoming messages all together.

Original comment by Bronisla...@bauglir.com on 11 Jan 2012 at 8:11