iface

package
v0.0.0-...-2ce55d9 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DefaultPort                = 2222
	DefaultBufferSize          = 3
	DefaultTTL                 = 5
	MasterRegistrationInterval = 30
	MasterPeerInfoTimeout      = 60
)

Variables

This section is empty.

Functions

func CalculateMD5Hash

func CalculateMD5Hash(msg Message) string

Types

type Address

type Address struct {
	IP   string
	Port int
}

func GetAddress

func GetAddress(ip string, port int) Address

func (Address) String

func (a Address) String() string

type CommonArgs

type CommonArgs struct {
	Type       string
	IP         string
	Port       int
	Alias      string
	BufferSize int
}

type Message

type Message struct {
	ToAlias   string
	FromAlias string
	Msg       string
	Time      time.Time
	MD5Hash   string
	TTL       int
}

type PeerInfo

type PeerInfo struct {
	IP        string
	Port      int
	Alias     string
	TimeStamp int64
}

Jump to

Keyboard shortcuts

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