5. PiaTransport Guide
Introduction
This chapter describes the features and programming procedures of the PiaTransport module in Pia. For more information, see the API reference.
Feature Overview
- The PiaTransport module is an abstraction of the lower layers of the network. Using PiaTransport allows the application to perform communication without having to distinguish between the communication techniques used at the lower layers.
- The PiaTransport module creates a thread for sending and a thread for receiving. These threads minimize the amount of time waiting for blocks when calling sending and receiving functions.
- The PiaTransport module provides the Protocol concept. The module has ReliableProtocol and UnreliableProtocol protocols, providing TCP-like reliable communication and UDP-like unreliable communication to the application.
- PiaTransport includes a packet-bundling feature that attempts to pack different types of data into a single packet whenever possible. This allows communication bandwidth to be used more effectively.
- In PiaTransport, packets can be signed to prevent packet tampering. Currently, the MD5 algorithm is used to generate packet signatures. Other algorithms such as SHA-1 will be added upon request.