
3 Apr
2007
3 Apr
'07
5:54 p.m.
Hello all, I'm writing an application to interact with other applications remotely though TCP sockets (primarily), and in the future with local apps also. So far I have a Parsec parser to match the input that I want to see, which works if the remote connection is particularly speedy - but the final goal is to obtain the following behavior: Match the Parsec parser against the input as soon as a match is available, but fail if the match is unavailable after a timeout value if no further data is available on the socket. The parser will be matching some input pattern such as (string "login:"), for example. What's the best approach to take while leveraging laziness if possible? Thanks, - Scott Bell