Documentation ¶
Index ¶
- Constants
- Variables
- func CopyBuffer(dst io.Writer, src io.Reader) (written int64, err error)
- func EnableProfiling(enabled bool)
- func FormatURL(s string) (string, error)
- func GenerateJwtToken(key []byte) (string, error)
- func HashedPassword(password string) string
- func KDF(password string, salt []byte, keySize int) []byte
- func NewTimeoutConn(conn net.Conn, timeout time.Duration) *timeoutConn
- func NextNonce(nonce []byte)
- func NowInMills() int64
- func PrintVersion()
- func Stringify(v interface{}) string
- func ValidateJwtToken(tokenString string, key []byte) error
- type Frame
- type ToxConn
- type ToxConnection
- type ToxOption
- func WithCertFile(certFile string) ToxOption
- func WithConnectTimeout(timeout time.Duration) ToxOption
- func WithInsecureSkipVerify(insecureSkipVerify bool) ToxOption
- func WithKeyFile(keyFile string) ToxOption
- func WithLocalAddress(localAddress string) ToxOption
- func WithPassword(password string) ToxOption
- func WithTimeout(timeout time.Duration) ToxOption
- func WithTunnel(tunnel string) ToxOption
- type ToxOptions
Constants ¶
View Source
const ( COMMAND_DATA = 0x01 COMMAND_CLOSE_WRITE = 0x02 PACK_DATA_BUF_SIZE = 4 )
View Source
const MagicKeySalt = "tox"
Variables ¶
View Source
var ( Name = "@isayme/tox" Version = "unknown" BuildTime = "unknown" GitRevision = "unknown" )
version info
Functions ¶
func CopyBuffer ¶ added in v0.2.1
Copy copy with default buf
func EnableProfiling ¶
func EnableProfiling(enabled bool)
func GenerateJwtToken ¶
func HashedPassword ¶ added in v0.2.0
func NewTimeoutConn ¶
NewTimeoutConn create timeout conn
func NowInMills ¶
func NowInMills() int64
func ValidateJwtToken ¶
Types ¶
type ToxConn ¶ added in v1.0.0
func NewToxConnection ¶ added in v1.0.0
func NewToxConnection(conn io.ReadWriteCloser) ToxConn
type ToxConnection ¶ added in v1.0.0
type ToxConnection struct {
// contains filtered or unexported fields
}
func (*ToxConnection) Close ¶ added in v1.0.0
func (conn *ToxConnection) Close() error
func (*ToxConnection) CloseWrite ¶ added in v1.0.0
func (conn *ToxConnection) CloseWrite() error
type ToxOption ¶ added in v1.0.0
type ToxOption interface {
// contains filtered or unexported methods
}
func WithCertFile ¶ added in v1.0.0
func WithConnectTimeout ¶ added in v1.0.0
func WithInsecureSkipVerify ¶ added in v1.0.0
func WithKeyFile ¶ added in v1.0.0
func WithLocalAddress ¶ added in v1.0.0
func WithPassword ¶ added in v1.0.0
func WithTimeout ¶ added in v1.0.0
func WithTunnel ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.