Is it possible to submit input to an FParsec parser in chunks, as from a socket? If not, is it possible to retrieve the current result and unparsed portion of an input stream so that I might accomplish this? I'm trying to run the chunks of input coming in from SocketAsyncEventArgs
without buffering entire messages.
Update
The reason for noting the use of SocketAsyncEventArgs
was to denote that sending data to a CharStream
might result in asynchronous access to the underlying Stream
. Specifically, I'm looking at using a circular buffer to push the data coming in from the socket. I remember the FParsec documentation noting that the underlying Stream
should not be accessed asynchronously, so I had planned on manually controlling the chunked parsing.
Ultimate questions:
- Can I use a circular buffer under my
Stream
passed to theCharStream
? - Do I not need to worry myself with manually controlling the chunking in this scenario?