util

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: BSD-3-Clause Imports: 15 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DefaultBaseDir = ".simpleVPN"
)

Variables

This section is empty.

Functions

func BaseDir

func BaseDir() string

func BigIntSub

func BigIntSub(x, y *big.Int) *big.Int

func ByteToUint

func ByteToUint(buff []byte) uint32

func DoHttpJSONDataPost added in v1.2.1

func DoHttpJSONDataPost(jsonData []byte, url string) ([]byte, error)

func FileExists

func FileExists(fileName string) (os.FileInfo, bool)

func GetNowMsTime

func GetNowMsTime() int64

func GetSavedConn

func GetSavedConn(rAddr string, connSaver ConnSaver, timeOut time.Duration) (net.Conn, error)

func InitLog

func InitLog(logPath string)

func Int64Time2String

func Int64Time2String(t int64) string

func ReadPassWord2

func ReadPassWord2() (string, error)

func Save2File

func Save2File(data []byte, filename string) error

func TouchDir

func TouchDir(dir string) error

func UintToByte

func UintToByte(val uint32) []byte

Types

type ConnSaver

type ConnSaver func(fd uintptr)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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