You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the idea of this module as a kind of generic "plug" but for network services. So after parsing you want to consult other code about whether to advance with parsing or not (possibly further parsing is dependent on state). Of course it's sensible to look at moving this completely externally, but equally it seems useful to sometimes want your parser to consume subsequent input based on some external state?
Might be a new PR, but I also see a potential for needing timeouts on parsing?
The text was updated successfully, but these errors were encountered:
Your characterization of this as a network-service plug resonates. The existing API for conditional parsing is StructuredIO.read_complex/3, which takes a function; returning {:ok, term} from the function consumes data from the stream. Tell me your thoughts on this.
As to timeouts, each of the StructuredIO.read* functions has an optional timeout parameter. Did you have something else in mind?
I like the idea of this module as a kind of generic "plug" but for network services. So after parsing you want to consult other code about whether to advance with parsing or not (possibly further parsing is dependent on state). Of course it's sensible to look at moving this completely externally, but equally it seems useful to sometimes want your parser to consume subsequent input based on some external state?
Might be a new PR, but I also see a potential for needing timeouts on parsing?
The text was updated successfully, but these errors were encountered: