Skip to content
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

Calculate MTU based on max packet size #26

Open
XeonSquared opened this issue Jul 11, 2019 · 0 comments
Open

Calculate MTU based on max packet size #26

XeonSquared opened this issue Jul 11, 2019 · 0 comments

Comments

@XeonSquared
Copy link
Member

maxPacketSize(): number
Returns the maximum packet size for sending messages via network cards.
Defaults to 8192. You can change this in the OpenComputers configuration file.

Every value in a message adds two bytes of overhead. (Even if there's only one value.) Numbers add another 8 bytes, true/false/nil another 4 bytes, and strings exactly as many bytes as the string contains—though empty strings still count as one byte.

The Minitel MTU should be calculable from the OC max packet size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant