|
Boost Users : |
From: Raffaele Romito (berserker_r_at_[hidden])
Date: 2007-08-13 05:58:16
Thanks for the reply John, I'll try to expose my "use case" with the hope this feature will be available in the future...
I'm developing a system that detects TCP streams with a pattern matching, here is the pseudo code (in a simplified form) of the function I'd link to extend:
protocol_stream decodeStream(tcp_stream)
{
foreach(registered protocol in the system)
{
required_size_to_match = calc_min_regex_len(current_protocol.regex);
if(tcp_stream.buffer_size <= required_size_to_match)
check if tcp_stream.buffer matches
else
try to read from tcp_stream if data is available until <required_size_to_match> and check again if matches
}
}
Hope u can help since you have "an almost pathological interest in anything that can't be done" :)
Thanks again
_________________________________________________________________
C'è una nuova amica su Messenger
E' Doretta, vieni a conoscerla!
http://www.doretta82.it/banner/index.html
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net