service

package
v0.0.0-...-8b5bd26 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const BUFFERSIZE = 4096

Variables

This section is empty.

Functions

func Gensock

func Gensock(conn net.Conn) *socket

func RandStringBytes

func RandStringBytes(n int) []byte

Types

type Config

type Config struct {
	Username     string
	Password     string
	ComPort      uint16
	PubHostList  map[string]int64
	PrivHostList map[string]int64
	MaskList     []net.IPNet
	PublicPath   string
	PrivatePath  string
}

type FileReq

type FileReq struct {
	Token     []byte
	Offset    int64
	BlockSize uint64
}

type Location

type Location struct {
	Priv bool
	Path []string
}

type Service

type Service struct {
	Config   *Config
	Host     string
	LPrivDir []string
	LPubDir  []string
	RPubDir  []string
	RPrivDir []string
	Files    map[string]bool
}

func (*Service) FileServiceReq

func (serv *Service) FileServiceReq(location Location) int

func (*Service) GetDir

func (serv *Service) GetDir(location Location) int

Client side get directory listing

func (*Service) HostRenewal

func (serv *Service) HostRenewal()

Renewing Host List

func (*Service) Lserver

func (serv *Service) Lserver() int

This is the remote server started on ComPort

Jump to

Keyboard shortcuts

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