protocol

package
v0.0.0-...-27a570a Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2017 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DELAY_BETWEEN_CLEANUPS = 1 * time.Second
	EXPIRATION_PERIOD      = 60
)
View Source
const (
	PORT = ":3141"
)

Variables

This section is empty.

Functions

func AutoIPCleanup

func AutoIPCleanup()

func BroadcastMessage

func BroadcastMessage(class int, data []byte)

BroadcastMessage functions shares a message with other peers. The algorithm isn't finalized yet and it's very innefficient.

func InitPartialNode

func InitPartialNode()

Opens the databases needed by many built in tools

func StartSyncServer

func StartSyncServer()

Start a full node

Types

type Message

type Message struct {
	Id   int
	Data []byte
}

type Update

type Update struct {
	IsDiff    bool
	Timestamp int64
	Data      []byte
	OldHash   []byte
	NewHash   []byte
}

func FindDiff

func FindDiff(f1, f2 string) *Update

func (*Update) Apply

func (u *Update) Apply(oldFile, newFile string) error

Jump to

Keyboard shortcuts

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