Skip to main content

Package Layer

The Package Layer is responsible for the encryption, compression, and wire format of the packets. It is what is responsible for taking the data from the higher layers (applications) and turning it into a format that can be sent to the transport layer.

The goal of the Package Layer is to provide a clean API/SDK for the higher layers to use to build and read packets. It should be able to handle all the complexities of encryption (including automatically exchanging and storing keys), compression, and wire format. This layer should be able to take fully formed messages from either the application layer or the transport layer and turn them into a format the other can use.