adjunct.netstrings¶
Simple netstring reader implemented as a generator.
MalformedNetstringError
¶
Bases: Exception
Raised when the netstring reader hits a parser error in the stream.
netstring_reader(fd)
¶
Read a sequence of netstrings from the given file object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fd
|
BufferedIOBase
|
a file-like object to read from |
required |
Yields:
| Type | Description |
|---|---|
Iterable[bytes]
|
netstrings |