-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove message size restriction #84
Labels
Comments
Proposal 1: Change how the initial message header is constructed. To get the initial header, the following script would work: def how_many_bytes(i):
num_bytes = 0
while i:
i >>= 8
num_bytes += 1
return num_bytes
def pack_header(i):
lengths = [i]
string = b""
while i != 1 or lengths == [1]:
i = how_many_bytes(lengths[-1])
lengths.append(i)
for index, length in enumerate(lengths[:-1]):
print("Packing %i into %i bytes" % (length, lengths[index + 1]))
string = pack_value(lengths[index + 1], length) + string
return b'\x01' + string This expands the possible message length to infinite scale. This proposal assumes that all headers are structured this way, including the packet separators. |
Proposal 2:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are multiple proposals on the table for how to do this. I will summarize the two in comments below. connects to #69
The text was updated successfully, but these errors were encountered: