Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BsonEncoder ¶
type BsonEncoder struct{}
type Config ¶
type Config struct {
ListenPort int
TransferRate int //bits per second
BlockSize int //in bytes
ErrorRate int //threshhold error rate (% x 1000)
SlowerNum int //numerator in the slowdown factor
SlowerDen int //denominator in the slowdown factor
FasterNum int //numerator in the speedup factor
FasterDen int //denominator in the speedup factor
MaxMissedLength int //max number of missed blocks before requesting retransmit
}
type MessageType ¶
type MessageType int
const ( AUTH MessageType = iota REV GET_FILE DATA RETRANSMIT ERROR_RATE DONE )
type Packet ¶
type Packet struct {
Type MessageType
Payload interface{}
}
type Progress ¶
type Progress struct {
Message string
Percentage float64
Type ProgressType
}
type ProgressType ¶
type ProgressType int
const ( HANDSHAKING ProgressType = iota TRANSFERRING ERROR TRANSFER_DONE )
type Retransmit ¶
Click to show internal directories.
Click to hide internal directories.