-
Notifications
You must be signed in to change notification settings - Fork 3
Interface
#Interface for encoding/decoding modules
###For the encoding modules on the upstream side Send() - Returns errors - takes in a buffer that is to be encoded - takes in size of data to be encoded - Sends all the data that's requested, either in one or many outbound packets (many URLs for instance)
###For the encoding modules on the downstream side Receive() - Returns errors - Takes a buffer that is to be decoded - Takes in size of data to be decoded
###For the decision part of HTPT on the upstream side Register() - Called by each of the encoding modules at initialization - Provides decision module information it needs to decide - Takes in: - Minimum size - likely to be 1 byte for URLs and ~4-30k for an image - Maximum size - likely to be 1000 bytes for URLs and MBs for an image ReceiveCallback() - Takes a list of decoded data - passes it up to Tor GetSequenceAndIncrement() - Returns sequence number and increments - Used by the various encode/decode modules that implement Send()
###For the decision part of HTPT on the downstream side SendData() - Sends data - Called by the various encode/decode modules