proto

package
v0.5.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const ChunkSize = 32 * 1024 // 32 KB
View Source
const Protocol = "/bdpeer/1.0.0"

Variables

This section is empty.

Functions

This section is empty.

Types

type Frame

type Frame struct {
	Type       FrameType `json:"type"`
	From       string    `json:"from"`
	Content    string    `json:"content,omitempty"`
	Name       string    `json:"name,omitempty"`
	Size       int64     `json:"size,omitempty"`
	Seq        int       `json:"seq,omitempty"`
	Data       []byte    `json:"data,omitempty"`
	Checksum   string    `json:"checksum,omitempty"`
	TransferID string    `json:"tid,omitempty"`
	AckErr     string    `json:"ack_err,omitempty"`
}

type FrameType

type FrameType string
const (
	FrameText      FrameType = "text"
	FrameFileStart FrameType = "file_start"
	FrameFileChunk FrameType = "file_chunk"
	FrameFileEnd   FrameType = "file_end"
	FrameFileAck   FrameType = "file_ack"
	FrameHello     FrameType = "hello"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL