-
Notifications
You must be signed in to change notification settings - Fork 3
Interface
Sathyanarayanan Gunasekaran edited this page Oct 29, 2013
·
7 revisions
Init()
- Called on each of the encoding modules
- Performs any initialization actions that are necessary.
- Expected to be very basic.
Register()
- Called on each of the encoding modules at initialization
- Provides encoding decision module information it needs to decide
- Returns:
- 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
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)
Receive()
- Returns errors
- Takes a buffer that is to be decoded
- Takes in size of data to be decoded
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()
SendData()
- Sends data
- Called by the various encode/decode modules