client

package
v0.0.0-...-70c1fab Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StartClientChan = make(chan *Client)

Functions

func CheckServer

func CheckServer(addr string) bool

func CkeckAllServerStatus

func CkeckAllServerStatus()

func CkeckServerStatus

func CkeckServerStatus(addr string)

func RequestForFile

func RequestForFile(file *dc.File)

func RequestForGeneration

func RequestForGeneration(generation *dc.Generation)

Types

type Client

type Client struct {
	Addr       string
	Hash       []byte
	Generation *dc.Generation
}

client type is used to connect to a server

func NewClient

func NewClient(addr string, hash []byte, generation *dc.Generation) *Client

func (*Client) GetNeighbours

func (c *Client) GetNeighbours() []string

func (*Client) IsServerAlive

func (c *Client) IsServerAlive() bool

func (*Client) Start

func (c *Client) Start(connChan chan net.Conn)

Jump to

Keyboard shortcuts

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