Re: Buffer Size Command Hanging - WeOnlyDo Discussion board

Re: Buffer Size Command Hanging (General questions)

by wodSupport, Wednesday, July 08, 2009, 13:21 (5403 days ago) @ mmorton

Here's how I would do it. Using send method send the command, and then call Receive or even better ReceiveLine to consume the data.

As data arrives, check if it contains the needed pattern. This is easy to do, except you have to prepare for possibility that data arrives byte by byte, so you always have to search previously received data too.

I suggest it's always good to store last received line. This is small amount of data to search, and can easily be handled using ReceiveLine method.

I can't make this as general approach because search patterns can contain more than one line. You can, however, since you know you only need one line of data for the search.

Does this help?

Kreso


Complete thread: