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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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