Make readuntil() raise IncompleteReadError if window size is exceeded
This commit makes readuntil() raise an IncompleteReadError if the receive window fills up before a delimiter match is found, making this case operate similar to when EOF is received or a signal is received on the channel. In the case of readline(), this will cause a partial line to be returned without a trailing '\n'. For direct calls to readuntil(), the exception is raised and the caller can retrieve the partial data from the "partial" field of the exception. To support longer lines, a caller is free to call readline() or readuntil() again in these cases, appending the data returned to the previous partial data, repeating this process as many times as they like. However, since the default window size is 2 MBytes, it's very unlikely that this will be needed.
R
Ron Frederick committed
2f7a9014d743a89a91aadfbaa4212c085de43e89
Parent: 8f47a09