mirror of
https://github.com/PeernetOfficial/core.git
synced 2026-07-18 19:17:51 +01:00
Proper abstraction of virtualPacketConn. It now supports other transport protocol encodings.
This commit is contained in:
@@ -8,6 +8,14 @@ Offset Size Info
|
||||
0 1 Control
|
||||
1 1 Transfer Protocol
|
||||
2 32 File Hash
|
||||
|
||||
Control = 0: Request Start
|
||||
34 8 Offset to start reading in the file
|
||||
42 8 Limit of bytes to read at the offset
|
||||
|
||||
Offset + limit must not exceed the file size.
|
||||
|
||||
Control = 3: Active
|
||||
34 ? Embedded protocol data
|
||||
|
||||
*/
|
||||
@@ -40,6 +48,8 @@ const (
|
||||
TransferControlTerminate = 3 // Terminate
|
||||
)
|
||||
|
||||
const TransferProtocolUDT = 0 // Indicates that UDT is used as embedded transfer protocol.
|
||||
|
||||
const transferPayloadHeaderSize = 34
|
||||
|
||||
// DecodeTransfer decodes a transfer message
|
||||
|
||||
Reference in New Issue
Block a user