notes about message length and MTUs

This commit is contained in:
Trolli Schmittlauch 2020-05-12 09:00:33 +02:00
parent e5db06a680
commit ec869593f6

View file

@ -28,6 +28,9 @@ import Debug.Trace
-- Only some kinds of payloads can be split, and only to a limited number of parts.
-- This function only deals with potentially large payload types and passes the
-- rest as-is.
--
-- The common IPv6 path MTU is 1280 bytes. When substracting 40 bytes TCP header (minimum) and 8 bytes UDP header, that gives remaining 1232 bytes for the payload.
-- Leaving room for IPv6 header extensions, 1200 bytes appear to be a good default.
splitPayload :: Int -- number of parts to split payload into
-> ActionPayload -- payload to be split
-> [ActionPayload] -- list of smaller payloads