astisrt

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 12 Imported by: 2

Documentation

Overview

Code generated by astisrt using internal/cmd/generate/options. DO NOT EDIT.

Code generated by astisrt using internal/cmd/generate/options. DO NOT EDIT.

Code generated by astisrt using internal/cmd/generate/stats. DO NOT EDIT.

Code generated by astisrt using internal/cmd/generate/wrap. DO NOT EDIT.

Index

Constants

View Source
const (
	LogLevelCritical = LogLevel(C.LOG_CRIT)
	LogLevelDebug    = LogLevel(C.LOG_DEBUG)
	LogLevelError    = LogLevel(C.LOG_ERR)
	LogLevelNotice   = LogLevel(C.LOG_NOTICE)
	LogLevelWarning  = LogLevel(C.LOG_WARNING)
)
View Source
const (
	TranstypeLive    = Transtype(C.SRTT_LIVE)
	TranstypeFile    = Transtype(C.SRTT_FILE)
	TranstypeInvalid = Transtype(C.SRTT_INVALID)
)
View Source
const (
	KmStateKmSUnsecured = KmState(C.SRT_KM_S_UNSECURED)
	KmStateKmSSecuring  = KmState(C.SRT_KM_S_SECURING)
	KmStateKmSSecured   = KmState(C.SRT_KM_S_SECURED)
	KmStateKmSNosecret  = KmState(C.SRT_KM_S_NOSECRET)
	KmStateKmSBadsecret = KmState(C.SRT_KM_S_BADSECRET)
)

Variables

View Source
var (
	ErrEunknown        = newError(C.SRT_EUNKNOWN, 0)
	ErrSuccess         = newError(C.SRT_SUCCESS, 0)
	ErrEconnsetup      = newError(C.SRT_ECONNSETUP, 0)
	ErrEnoserver       = newError(C.SRT_ENOSERVER, 0)
	ErrEconnrej        = newError(C.SRT_ECONNREJ, 0)
	ErrEsockfail       = newError(C.SRT_ESOCKFAIL, 0)
	ErrEsecfail        = newError(C.SRT_ESECFAIL, 0)
	ErrEsclosed        = newError(C.SRT_ESCLOSED, 0)
	ErrEconnfail       = newError(C.SRT_ECONNFAIL, 0)
	ErrEconnlost       = newError(C.SRT_ECONNLOST, 0)
	ErrEnoconn         = newError(C.SRT_ENOCONN, 0)
	ErrEresource       = newError(C.SRT_ERESOURCE, 0)
	ErrEthread         = newError(C.SRT_ETHREAD, 0)
	ErrEnobuf          = newError(C.SRT_ENOBUF, 0)
	ErrEsysobj         = newError(C.SRT_ESYSOBJ, 0)
	ErrEfile           = newError(C.SRT_EFILE, 0)
	ErrEinvrdoff       = newError(C.SRT_EINVRDOFF, 0)
	ErrErdperm         = newError(C.SRT_ERDPERM, 0)
	ErrEinvwroff       = newError(C.SRT_EINVWROFF, 0)
	ErrEwrperm         = newError(C.SRT_EWRPERM, 0)
	ErrEinvop          = newError(C.SRT_EINVOP, 0)
	ErrEboundsock      = newError(C.SRT_EBOUNDSOCK, 0)
	ErrEconnsock       = newError(C.SRT_ECONNSOCK, 0)
	ErrEinvparam       = newError(C.SRT_EINVPARAM, 0)
	ErrEinvsock        = newError(C.SRT_EINVSOCK, 0)
	ErrEunboundsock    = newError(C.SRT_EUNBOUNDSOCK, 0)
	ErrEnolisten       = newError(C.SRT_ENOLISTEN, 0)
	ErrErdvnoserv      = newError(C.SRT_ERDVNOSERV, 0)
	ErrErdvunbound     = newError(C.SRT_ERDVUNBOUND, 0)
	ErrEinvalmsgapi    = newError(C.SRT_EINVALMSGAPI, 0)
	ErrEinvalbufferapi = newError(C.SRT_EINVALBUFFERAPI, 0)
	ErrEduplisten      = newError(C.SRT_EDUPLISTEN, 0)
	ErrElargemsg       = newError(C.SRT_ELARGEMSG, 0)
	ErrEinvpollid      = newError(C.SRT_EINVPOLLID, 0)
	ErrEpollempty      = newError(C.SRT_EPOLLEMPTY, 0)
	ErrEbindconflict   = newError(C.SRT_EBINDCONFLICT, 0)
	ErrEasyncfail      = newError(C.SRT_EASYNCFAIL, 0)
	ErrEasyncsnd       = newError(C.SRT_EASYNCSND, 0)
	ErrEasyncrcv       = newError(C.SRT_EASYNCRCV, 0)
	ErrEtimeout        = newError(C.SRT_ETIMEOUT, 0)
	ErrEcongest        = newError(C.SRT_ECONGEST, 0)
	ErrEpeererr        = newError(C.SRT_EPEERERR, 0)
)
View Source
var (
	ErrServerClosed = errors.New("astisrt: server closed")
)
View Source
var NopServerHandler = nopServerHandler{}

Functions

Types

type ConnectCallback

type ConnectCallback func(s *Socket, addr *net.UDPAddr, token int, err error)

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(o DialOptions) (c *Connection, err error)

func (*Connection) Addr

func (c *Connection) Addr() *net.UDPAddr

func (*Connection) Close

func (c *Connection) Close() error

func (*Connection) Context

func (c *Connection) Context() context.Context

func (*Connection) Options

func (c *Connection) Options() *ConnectionOptions

func (*Connection) Read

func (c *Connection) Read(b []byte) (int, error)

func (*Connection) RejectReason

func (c *Connection) RejectReason() RejectReason

func (*Connection) SetPredefinedRejectReason

func (c *Connection) SetPredefinedRejectReason(httpStatus int) error

HTTP status must be [0:1000) https://github.com/Haivision/srt/blob/master/docs/API/API-functions.md#srt_setrejectreason

func (*Connection) SetUserDefinedRejectReason

func (c *Connection) SetUserDefinedRejectReason(status int) error

Status must be [0:1000) https://github.com/Haivision/srt/blob/master/docs/API/API-functions.md#srt_setrejectreason

func (*Connection) Stats

func (c *Connection) Stats(clear, instantaneous bool) (Stats, error)

func (*Connection) WithContext

func (c *Connection) WithContext(ctx context.Context) *Connection

func (*Connection) Write

func (c *Connection) Write(b []byte) (int, error)

type ConnectionOption

type ConnectionOption struct {
	// contains filtered or unexported fields
}

func WithBindtodevice

func WithBindtodevice(v string) ConnectionOption

func WithCongestion

func WithCongestion(v string) ConnectionOption

func WithConntimeo

func WithConntimeo(v int32) ConnectionOption

func WithDrifttracer

func WithDrifttracer(v bool) ConnectionOption

func WithEnforcedencryption

func WithEnforcedencryption(v bool) ConnectionOption

func WithFc

func WithFc(v int32) ConnectionOption

func WithGroupconnect

func WithGroupconnect(v int32) ConnectionOption

func WithGroupminstabletimeo

func WithGroupminstabletimeo(v int32) ConnectionOption

func WithInputbw

func WithInputbw(v int64) ConnectionOption

func WithIptos

func WithIptos(v int32) ConnectionOption

func WithIpttl

func WithIpttl(v int32) ConnectionOption

func WithIpv6only

func WithIpv6only(v int32) ConnectionOption

func WithKmpreannounce

func WithKmpreannounce(v int32) ConnectionOption

func WithKmrefreshrate

func WithKmrefreshrate(v int32) ConnectionOption

func WithLatency

func WithLatency(v int32) ConnectionOption

func WithLinger

func WithLinger(v syscall.Linger) ConnectionOption

func WithLossmaxttl

func WithLossmaxttl(v int32) ConnectionOption

func WithMaxbw

func WithMaxbw(v int64) ConnectionOption

func WithMessageapi

func WithMessageapi(v bool) ConnectionOption

func WithMininputbw

func WithMininputbw(v int64) ConnectionOption

func WithMinversion

func WithMinversion(v int32) ConnectionOption

func WithMss

func WithMss(v int32) ConnectionOption

func WithNakreport

func WithNakreport(v bool) ConnectionOption

func WithOheadbw

func WithOheadbw(v int32) ConnectionOption

func WithPacketfilter

func WithPacketfilter(v string) ConnectionOption

func WithPassphrase

func WithPassphrase(v string) ConnectionOption

func WithPayloadsize

func WithPayloadsize(v int32) ConnectionOption

func WithPbkeylen

func WithPbkeylen(v int32) ConnectionOption

func WithPeeridletimeo

func WithPeeridletimeo(v int32) ConnectionOption

func WithPeerlatency

func WithPeerlatency(v int32) ConnectionOption

func WithRcvbuf

func WithRcvbuf(v int32) ConnectionOption

func WithRcvlatency

func WithRcvlatency(v int32) ConnectionOption

func WithRcvtimeo

func WithRcvtimeo(v int32) ConnectionOption

func WithRendezvous

func WithRendezvous(v bool) ConnectionOption

func WithRetransmitalgo

func WithRetransmitalgo(v int32) ConnectionOption

func WithReuseaddr

func WithReuseaddr(v bool) ConnectionOption

func WithSender

func WithSender(v bool) ConnectionOption

func WithSndbuf

func WithSndbuf(v int32) ConnectionOption

func WithSnddropdelay

func WithSnddropdelay(v int32) ConnectionOption

func WithSndtimeo

func WithSndtimeo(v int32) ConnectionOption

func WithStreamid

func WithStreamid(v string) ConnectionOption

func WithTlpktdrop

func WithTlpktdrop(v bool) ConnectionOption

func WithTranstype

func WithTranstype(v Transtype) ConnectionOption

func WithTsbpdmode

func WithTsbpdmode(v bool) ConnectionOption

func WithUdpRcvbuf

func WithUdpRcvbuf(v int32) ConnectionOption

func WithUdpSndbuf

func WithUdpSndbuf(v int32) ConnectionOption

type ConnectionOptions

type ConnectionOptions struct {
	// contains filtered or unexported fields
}

func (*ConnectionOptions) Bindtodevice

func (co *ConnectionOptions) Bindtodevice() (string, error)

func (*ConnectionOptions) Drifttracer

func (co *ConnectionOptions) Drifttracer() (bool, error)

func (*ConnectionOptions) Event

func (co *ConnectionOptions) Event() (int32, error)

func (*ConnectionOptions) Fc

func (co *ConnectionOptions) Fc() (int32, error)

func (*ConnectionOptions) Grouptype

func (co *ConnectionOptions) Grouptype() (int32, error)

func (*ConnectionOptions) Inputbw

func (co *ConnectionOptions) Inputbw() (int64, error)

func (*ConnectionOptions) Iptos

func (co *ConnectionOptions) Iptos() (int32, error)

func (*ConnectionOptions) Ipttl

func (co *ConnectionOptions) Ipttl() (int32, error)

func (*ConnectionOptions) Ipv6only

func (co *ConnectionOptions) Ipv6only() (int32, error)

func (*ConnectionOptions) Isn

func (co *ConnectionOptions) Isn() (int32, error)

func (*ConnectionOptions) Kmpreannounce

func (co *ConnectionOptions) Kmpreannounce() (int32, error)

func (*ConnectionOptions) Kmrefreshrate

func (co *ConnectionOptions) Kmrefreshrate() (int32, error)

func (*ConnectionOptions) Kmstate

func (co *ConnectionOptions) Kmstate() (KmState, error)

func (*ConnectionOptions) Latency

func (co *ConnectionOptions) Latency() (int32, error)

func (*ConnectionOptions) Linger

func (co *ConnectionOptions) Linger() (syscall.Linger, error)

func (*ConnectionOptions) Lossmaxttl

func (co *ConnectionOptions) Lossmaxttl() (int32, error)

func (*ConnectionOptions) Maxbw

func (co *ConnectionOptions) Maxbw() (int64, error)

func (*ConnectionOptions) Mininputbw

func (co *ConnectionOptions) Mininputbw() (int64, error)

func (*ConnectionOptions) Minversion

func (co *ConnectionOptions) Minversion() (int32, error)

func (*ConnectionOptions) Mss

func (co *ConnectionOptions) Mss() (int32, error)

func (*ConnectionOptions) Nakreport

func (co *ConnectionOptions) Nakreport() (bool, error)

func (*ConnectionOptions) Oheadbw

func (co *ConnectionOptions) Oheadbw() (int32, error)

func (*ConnectionOptions) Packetfilter

func (co *ConnectionOptions) Packetfilter() (string, error)

func (*ConnectionOptions) Pbkeylen

func (co *ConnectionOptions) Pbkeylen() (int32, error)

func (*ConnectionOptions) Peeridletimeo

func (co *ConnectionOptions) Peeridletimeo() (int32, error)

func (*ConnectionOptions) Peerlatency

func (co *ConnectionOptions) Peerlatency() (int32, error)

func (*ConnectionOptions) Peerversion

func (co *ConnectionOptions) Peerversion() (int32, error)

func (*ConnectionOptions) Rcvbuf

func (co *ConnectionOptions) Rcvbuf() (int32, error)

func (*ConnectionOptions) Rcvdata

func (co *ConnectionOptions) Rcvdata() (int32, error)

func (*ConnectionOptions) Rcvkmstate

func (co *ConnectionOptions) Rcvkmstate() (int32, error)

func (*ConnectionOptions) Rcvlatency

func (co *ConnectionOptions) Rcvlatency() (int32, error)

func (*ConnectionOptions) Rcvtimeo

func (co *ConnectionOptions) Rcvtimeo() (int32, error)

func (*ConnectionOptions) Rendezvous

func (co *ConnectionOptions) Rendezvous() (bool, error)

func (*ConnectionOptions) Retransmitalgo

func (co *ConnectionOptions) Retransmitalgo() (int32, error)

func (*ConnectionOptions) Reuseaddr

func (co *ConnectionOptions) Reuseaddr() (bool, error)

func (*ConnectionOptions) SetBindtodevice

func (co *ConnectionOptions) SetBindtodevice(v string) error

func (*ConnectionOptions) SetCongestion

func (co *ConnectionOptions) SetCongestion(v string) error

func (*ConnectionOptions) SetConntimeo

func (co *ConnectionOptions) SetConntimeo(v int32) error

func (*ConnectionOptions) SetDrifttracer

func (co *ConnectionOptions) SetDrifttracer(v bool) error

func (*ConnectionOptions) SetEnforcedencryption

func (co *ConnectionOptions) SetEnforcedencryption(v bool) error

func (*ConnectionOptions) SetFc

func (co *ConnectionOptions) SetFc(v int32) error

func (*ConnectionOptions) SetGroupconnect

func (co *ConnectionOptions) SetGroupconnect(v int32) error

func (*ConnectionOptions) SetGroupminstabletimeo

func (co *ConnectionOptions) SetGroupminstabletimeo(v int32) error

func (*ConnectionOptions) SetInputbw

func (co *ConnectionOptions) SetInputbw(v int64) error

func (*ConnectionOptions) SetIptos

func (co *ConnectionOptions) SetIptos(v int32) error

func (*ConnectionOptions) SetIpttl

func (co *ConnectionOptions) SetIpttl(v int32) error

func (*ConnectionOptions) SetIpv6only

func (co *ConnectionOptions) SetIpv6only(v int32) error

func (*ConnectionOptions) SetKmpreannounce

func (co *ConnectionOptions) SetKmpreannounce(v int32) error

func (*ConnectionOptions) SetKmrefreshrate

func (co *ConnectionOptions) SetKmrefreshrate(v int32) error

func (*ConnectionOptions) SetLatency

func (co *ConnectionOptions) SetLatency(v int32) error

func (*ConnectionOptions) SetLinger

func (co *ConnectionOptions) SetLinger(v syscall.Linger) error

func (*ConnectionOptions) SetLossmaxttl

func (co *ConnectionOptions) SetLossmaxttl(v int32) error

func (*ConnectionOptions) SetMaxbw

func (co *ConnectionOptions) SetMaxbw(v int64) error

func (*ConnectionOptions) SetMessageapi

func (co *ConnectionOptions) SetMessageapi(v bool) error

func (*ConnectionOptions) SetMininputbw

func (co *ConnectionOptions) SetMininputbw(v int64) error

func (*ConnectionOptions) SetMinversion

func (co *ConnectionOptions) SetMinversion(v int32) error

func (*ConnectionOptions) SetMss

func (co *ConnectionOptions) SetMss(v int32) error

func (*ConnectionOptions) SetNakreport

func (co *ConnectionOptions) SetNakreport(v bool) error

func (*ConnectionOptions) SetOheadbw

func (co *ConnectionOptions) SetOheadbw(v int32) error

func (*ConnectionOptions) SetPacketfilter

func (co *ConnectionOptions) SetPacketfilter(v string) error

func (*ConnectionOptions) SetPassphrase

func (co *ConnectionOptions) SetPassphrase(v string) error

func (*ConnectionOptions) SetPayloadsize

func (co *ConnectionOptions) SetPayloadsize(v int32) error

func (*ConnectionOptions) SetPbkeylen

func (co *ConnectionOptions) SetPbkeylen(v int32) error

func (*ConnectionOptions) SetPeeridletimeo

func (co *ConnectionOptions) SetPeeridletimeo(v int32) error

func (*ConnectionOptions) SetPeerlatency

func (co *ConnectionOptions) SetPeerlatency(v int32) error

func (*ConnectionOptions) SetRcvbuf

func (co *ConnectionOptions) SetRcvbuf(v int32) error

func (*ConnectionOptions) SetRcvlatency

func (co *ConnectionOptions) SetRcvlatency(v int32) error

func (*ConnectionOptions) SetRcvtimeo

func (co *ConnectionOptions) SetRcvtimeo(v int32) error

func (*ConnectionOptions) SetRendezvous

func (co *ConnectionOptions) SetRendezvous(v bool) error

func (*ConnectionOptions) SetRetransmitalgo

func (co *ConnectionOptions) SetRetransmitalgo(v int32) error

func (*ConnectionOptions) SetReuseaddr

func (co *ConnectionOptions) SetReuseaddr(v bool) error

func (*ConnectionOptions) SetSender

func (co *ConnectionOptions) SetSender(v bool) error

func (*ConnectionOptions) SetSndbuf

func (co *ConnectionOptions) SetSndbuf(v int32) error

func (*ConnectionOptions) SetSnddropdelay

func (co *ConnectionOptions) SetSnddropdelay(v int32) error

func (*ConnectionOptions) SetSndtimeo

func (co *ConnectionOptions) SetSndtimeo(v int32) error

func (*ConnectionOptions) SetStreamid

func (co *ConnectionOptions) SetStreamid(v string) error

func (*ConnectionOptions) SetTlpktdrop

func (co *ConnectionOptions) SetTlpktdrop(v bool) error

func (*ConnectionOptions) SetTranstype

func (co *ConnectionOptions) SetTranstype(v Transtype) error

func (*ConnectionOptions) SetTsbpdmode

func (co *ConnectionOptions) SetTsbpdmode(v bool) error

func (*ConnectionOptions) SetUdpRcvbuf

func (co *ConnectionOptions) SetUdpRcvbuf(v int32) error

func (*ConnectionOptions) SetUdpSndbuf

func (co *ConnectionOptions) SetUdpSndbuf(v int32) error

func (*ConnectionOptions) Sndbuf

func (co *ConnectionOptions) Sndbuf() (int32, error)

func (*ConnectionOptions) Snddata

func (co *ConnectionOptions) Snddata() (int32, error)

func (*ConnectionOptions) Sndkmstate

func (co *ConnectionOptions) Sndkmstate() (int32, error)

func (*ConnectionOptions) Sndtimeo

func (co *ConnectionOptions) Sndtimeo() (int32, error)

func (*ConnectionOptions) State

func (co *ConnectionOptions) State() (int32, error)

func (*ConnectionOptions) Streamid

func (co *ConnectionOptions) Streamid() (string, error)

func (*ConnectionOptions) Tlpktdrop

func (co *ConnectionOptions) Tlpktdrop() (bool, error)

func (*ConnectionOptions) UdpRcvbuf

func (co *ConnectionOptions) UdpRcvbuf() (int32, error)

func (*ConnectionOptions) UdpSndbuf

func (co *ConnectionOptions) UdpSndbuf() (int32, error)

func (*ConnectionOptions) Version

func (co *ConnectionOptions) Version() (int32, error)

type DialOnDisconnect

type DialOnDisconnect func(c *Connection, err error)

type DialOptions

type DialOptions struct {
	// Connection options
	ConnectionOptions []ConnectionOption

	// Host to connect to
	Host string

	// Callback executed when connection disconnects.
	OnDisconnect DialOnDisconnect

	// Port to connect to
	Port uint16
}

type Error

type Error struct {
	// contains filtered or unexported fields
}

func (Error) Is

func (err Error) Is(e error) bool

func (Error) Unwrap

func (err Error) Unwrap() error

type KmState

type KmState int32

type ListenCallback

type ListenCallback func(s *Socket, version int, addr *net.UDPAddr, streamID string) bool

type LogHandler

type LogHandler func(l LogLevel, file, area, msg string, line int)

type LogLevel

type LogLevel int

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(o ServerOptions) (srv *Server, err error)

func (*Server) Close

func (srv *Server) Close() error

func (*Server) ListenAndServe

func (srv *Server) ListenAndServe(backlog int) (err error)

func (*Server) Shutdown

func (srv *Server) Shutdown(ctx context.Context) (err error)

type ServerHandler

type ServerHandler interface {
	ServeSRT(c *Connection)
}

type ServerHandlerFunc

type ServerHandlerFunc func(c *Connection)

func (ServerHandlerFunc) ServeSRT

func (f ServerHandlerFunc) ServeSRT(c *Connection)

type ServerOnBeforeAccept

type ServerOnBeforeAccept func(c *Connection, version int, streamID string) bool

type ServerOptions

type ServerOptions struct {
	// Connection options
	ConnectionOptions []ConnectionOption

	// Handler to invoke on accepted connections
	// Defaults to NopServerHandler
	Handler ServerHandler

	// Host to bind with
	Host string

	// Callback executed before accepting a new connection.
	// Return true if connection should be accepted, false otherwise.
	OnBeforeAccept ServerOnBeforeAccept

	// Port to bind with
	Port uint16
}

type Socket

type Socket struct {
	// contains filtered or unexported fields
}

func (*Socket) Options

func (s *Socket) Options() *SocketOptions

func (*Socket) Stats

func (s *Socket) Stats(clear, instantaneous bool) (ss Stats, err error)

type SocketOptions

type SocketOptions struct {
	// contains filtered or unexported fields
}

func (*SocketOptions) Bindtodevice

func (so *SocketOptions) Bindtodevice() (string, error)

func (*SocketOptions) Drifttracer

func (so *SocketOptions) Drifttracer() (bool, error)

func (*SocketOptions) Event

func (so *SocketOptions) Event() (int32, error)

func (*SocketOptions) Fc

func (so *SocketOptions) Fc() (int32, error)

func (*SocketOptions) Grouptype

func (so *SocketOptions) Grouptype() (int32, error)

func (*SocketOptions) Inputbw

func (so *SocketOptions) Inputbw() (int64, error)

func (*SocketOptions) Iptos

func (so *SocketOptions) Iptos() (int32, error)

func (*SocketOptions) Ipttl

func (so *SocketOptions) Ipttl() (int32, error)

func (*SocketOptions) Ipv6only

func (so *SocketOptions) Ipv6only() (int32, error)

func (*SocketOptions) Isn

func (so *SocketOptions) Isn() (int32, error)

func (*SocketOptions) Kmpreannounce

func (so *SocketOptions) Kmpreannounce() (int32, error)

func (*SocketOptions) Kmrefreshrate

func (so *SocketOptions) Kmrefreshrate() (int32, error)

func (*SocketOptions) Kmstate

func (so *SocketOptions) Kmstate() (KmState, error)

func (*SocketOptions) Latency

func (so *SocketOptions) Latency() (int32, error)

func (*SocketOptions) Linger

func (so *SocketOptions) Linger() (syscall.Linger, error)

func (*SocketOptions) Lossmaxttl

func (so *SocketOptions) Lossmaxttl() (int32, error)

func (*SocketOptions) Maxbw

func (so *SocketOptions) Maxbw() (int64, error)

func (*SocketOptions) Mininputbw

func (so *SocketOptions) Mininputbw() (int64, error)

func (*SocketOptions) Minversion

func (so *SocketOptions) Minversion() (int32, error)

func (*SocketOptions) Mss

func (so *SocketOptions) Mss() (int32, error)

func (*SocketOptions) Nakreport

func (so *SocketOptions) Nakreport() (bool, error)

func (*SocketOptions) Oheadbw

func (so *SocketOptions) Oheadbw() (int32, error)

func (*SocketOptions) Packetfilter

func (so *SocketOptions) Packetfilter() (string, error)

func (*SocketOptions) Pbkeylen

func (so *SocketOptions) Pbkeylen() (int32, error)

func (*SocketOptions) Peeridletimeo

func (so *SocketOptions) Peeridletimeo() (int32, error)

func (*SocketOptions) Peerlatency

func (so *SocketOptions) Peerlatency() (int32, error)

func (*SocketOptions) Peerversion

func (so *SocketOptions) Peerversion() (int32, error)

func (*SocketOptions) Rcvbuf

func (so *SocketOptions) Rcvbuf() (int32, error)

func (*SocketOptions) Rcvdata

func (so *SocketOptions) Rcvdata() (int32, error)

func (*SocketOptions) Rcvkmstate

func (so *SocketOptions) Rcvkmstate() (int32, error)

func (*SocketOptions) Rcvlatency

func (so *SocketOptions) Rcvlatency() (int32, error)

func (*SocketOptions) Rcvsyn

func (so *SocketOptions) Rcvsyn() (bool, error)

func (*SocketOptions) Rcvtimeo

func (so *SocketOptions) Rcvtimeo() (int32, error)

func (*SocketOptions) Rendezvous

func (so *SocketOptions) Rendezvous() (bool, error)

func (*SocketOptions) Retransmitalgo

func (so *SocketOptions) Retransmitalgo() (int32, error)

func (*SocketOptions) Reuseaddr

func (so *SocketOptions) Reuseaddr() (bool, error)

func (*SocketOptions) SetBindtodevice

func (so *SocketOptions) SetBindtodevice(v string) error

func (*SocketOptions) SetCongestion

func (so *SocketOptions) SetCongestion(v string) error

func (*SocketOptions) SetConntimeo

func (so *SocketOptions) SetConntimeo(v int32) error

func (*SocketOptions) SetDrifttracer

func (so *SocketOptions) SetDrifttracer(v bool) error

func (*SocketOptions) SetEnforcedencryption

func (so *SocketOptions) SetEnforcedencryption(v bool) error

func (*SocketOptions) SetFc

func (so *SocketOptions) SetFc(v int32) error

func (*SocketOptions) SetGroupconnect

func (so *SocketOptions) SetGroupconnect(v int32) error

func (*SocketOptions) SetGroupminstabletimeo

func (so *SocketOptions) SetGroupminstabletimeo(v int32) error

func (*SocketOptions) SetInputbw

func (so *SocketOptions) SetInputbw(v int64) error

func (*SocketOptions) SetIptos

func (so *SocketOptions) SetIptos(v int32) error

func (*SocketOptions) SetIpttl

func (so *SocketOptions) SetIpttl(v int32) error

func (*SocketOptions) SetIpv6only

func (so *SocketOptions) SetIpv6only(v int32) error

func (*SocketOptions) SetKmpreannounce

func (so *SocketOptions) SetKmpreannounce(v int32) error

func (*SocketOptions) SetKmrefreshrate

func (so *SocketOptions) SetKmrefreshrate(v int32) error

func (*SocketOptions) SetLatency

func (so *SocketOptions) SetLatency(v int32) error

func (*SocketOptions) SetLinger

func (so *SocketOptions) SetLinger(v syscall.Linger) error

func (*SocketOptions) SetLossmaxttl

func (so *SocketOptions) SetLossmaxttl(v int32) error

func (*SocketOptions) SetMaxbw

func (so *SocketOptions) SetMaxbw(v int64) error

func (*SocketOptions) SetMessageapi

func (so *SocketOptions) SetMessageapi(v bool) error

func (*SocketOptions) SetMininputbw

func (so *SocketOptions) SetMininputbw(v int64) error

func (*SocketOptions) SetMinversion

func (so *SocketOptions) SetMinversion(v int32) error

func (*SocketOptions) SetMss

func (so *SocketOptions) SetMss(v int32) error

func (*SocketOptions) SetNakreport

func (so *SocketOptions) SetNakreport(v bool) error

func (*SocketOptions) SetOheadbw

func (so *SocketOptions) SetOheadbw(v int32) error

func (*SocketOptions) SetPacketfilter

func (so *SocketOptions) SetPacketfilter(v string) error

func (*SocketOptions) SetPassphrase

func (so *SocketOptions) SetPassphrase(v string) error

func (*SocketOptions) SetPayloadsize

func (so *SocketOptions) SetPayloadsize(v int32) error

func (*SocketOptions) SetPbkeylen

func (so *SocketOptions) SetPbkeylen(v int32) error

func (*SocketOptions) SetPeeridletimeo

func (so *SocketOptions) SetPeeridletimeo(v int32) error

func (*SocketOptions) SetPeerlatency

func (so *SocketOptions) SetPeerlatency(v int32) error

func (*SocketOptions) SetRcvbuf

func (so *SocketOptions) SetRcvbuf(v int32) error

func (*SocketOptions) SetRcvlatency

func (so *SocketOptions) SetRcvlatency(v int32) error

func (*SocketOptions) SetRcvsyn

func (so *SocketOptions) SetRcvsyn(v bool) error

func (*SocketOptions) SetRcvtimeo

func (so *SocketOptions) SetRcvtimeo(v int32) error

func (*SocketOptions) SetRendezvous

func (so *SocketOptions) SetRendezvous(v bool) error

func (*SocketOptions) SetRetransmitalgo

func (so *SocketOptions) SetRetransmitalgo(v int32) error

func (*SocketOptions) SetReuseaddr

func (so *SocketOptions) SetReuseaddr(v bool) error

func (*SocketOptions) SetSender

func (so *SocketOptions) SetSender(v bool) error

func (*SocketOptions) SetSndbuf

func (so *SocketOptions) SetSndbuf(v int32) error

func (*SocketOptions) SetSnddropdelay

func (so *SocketOptions) SetSnddropdelay(v int32) error

func (*SocketOptions) SetSndsyn

func (so *SocketOptions) SetSndsyn(v bool) error

func (*SocketOptions) SetSndtimeo

func (so *SocketOptions) SetSndtimeo(v int32) error

func (*SocketOptions) SetStreamid

func (so *SocketOptions) SetStreamid(v string) error

func (*SocketOptions) SetTlpktdrop

func (so *SocketOptions) SetTlpktdrop(v bool) error

func (*SocketOptions) SetTranstype

func (so *SocketOptions) SetTranstype(v Transtype) error

func (*SocketOptions) SetTsbpdmode

func (so *SocketOptions) SetTsbpdmode(v bool) error

func (*SocketOptions) SetUdpRcvbuf

func (so *SocketOptions) SetUdpRcvbuf(v int32) error

func (*SocketOptions) SetUdpSndbuf

func (so *SocketOptions) SetUdpSndbuf(v int32) error

func (*SocketOptions) Sndbuf

func (so *SocketOptions) Sndbuf() (int32, error)

func (*SocketOptions) Snddata

func (so *SocketOptions) Snddata() (int32, error)

func (*SocketOptions) Sndkmstate

func (so *SocketOptions) Sndkmstate() (int32, error)

func (*SocketOptions) Sndsyn

func (so *SocketOptions) Sndsyn() (bool, error)

func (*SocketOptions) Sndtimeo

func (so *SocketOptions) Sndtimeo() (int32, error)

func (*SocketOptions) State

func (so *SocketOptions) State() (int32, error)

func (*SocketOptions) Streamid

func (so *SocketOptions) Streamid() (string, error)

func (*SocketOptions) Tlpktdrop

func (so *SocketOptions) Tlpktdrop() (bool, error)

func (*SocketOptions) UdpRcvbuf

func (so *SocketOptions) UdpRcvbuf() (int32, error)

func (*SocketOptions) UdpSndbuf

func (so *SocketOptions) UdpSndbuf() (int32, error)

func (*SocketOptions) Version

func (so *SocketOptions) Version() (int32, error)

type Stats

type Stats struct {
	// contains filtered or unexported fields
}

func (Stats) ByteAvailRcvBuf

func (ss Stats) ByteAvailRcvBuf() int

func (Stats) ByteAvailSndBuf

func (ss Stats) ByteAvailSndBuf() int

func (Stats) ByteMSS

func (ss Stats) ByteMSS() int

func (Stats) ByteRcvBuf

func (ss Stats) ByteRcvBuf() int

func (Stats) ByteRcvDrop

func (ss Stats) ByteRcvDrop() uint64

func (Stats) ByteRcvDropTotal

func (ss Stats) ByteRcvDropTotal() uint64

func (Stats) ByteRcvLoss

func (ss Stats) ByteRcvLoss() uint64

func (Stats) ByteRcvLossTotal

func (ss Stats) ByteRcvLossTotal() uint64

func (Stats) ByteRcvUndecrypt

func (ss Stats) ByteRcvUndecrypt() uint64

func (Stats) ByteRcvUndecryptTotal

func (ss Stats) ByteRcvUndecryptTotal() uint64

func (Stats) ByteRecv

func (ss Stats) ByteRecv() uint64

func (Stats) ByteRecvTotal

func (ss Stats) ByteRecvTotal() uint64

func (Stats) ByteRecvUnique

func (ss Stats) ByteRecvUnique() uint64

func (Stats) ByteRecvUniqueTotal

func (ss Stats) ByteRecvUniqueTotal() uint64

func (Stats) ByteRetrans

func (ss Stats) ByteRetrans() uint64

func (Stats) ByteRetransTotal

func (ss Stats) ByteRetransTotal() uint64

func (Stats) ByteSent

func (ss Stats) ByteSent() uint64

func (Stats) ByteSentTotal

func (ss Stats) ByteSentTotal() uint64

func (Stats) ByteSentUnique

func (ss Stats) ByteSentUnique() uint64

func (Stats) ByteSentUniqueTotal

func (ss Stats) ByteSentUniqueTotal() uint64

func (Stats) ByteSndBuf

func (ss Stats) ByteSndBuf() int

func (Stats) ByteSndDrop

func (ss Stats) ByteSndDrop() uint64

func (Stats) ByteSndDropTotal

func (ss Stats) ByteSndDropTotal() uint64

func (Stats) MbpsBandwidth

func (ss Stats) MbpsBandwidth() float64

func (Stats) MbpsMaxBW

func (ss Stats) MbpsMaxBW() float64

func (Stats) MbpsRecvRate

func (ss Stats) MbpsRecvRate() float64

func (Stats) MbpsSendRate

func (ss Stats) MbpsSendRate() float64

func (Stats) MsRTT

func (ss Stats) MsRTT() float64

func (Stats) MsRcvBuf

func (ss Stats) MsRcvBuf() int

func (Stats) MsRcvTsbPdDelay

func (ss Stats) MsRcvTsbPdDelay() int

func (Stats) MsSndBuf

func (ss Stats) MsSndBuf() int

func (Stats) MsSndTsbPdDelay

func (ss Stats) MsSndTsbPdDelay() int

func (Stats) MsTimeStamp

func (ss Stats) MsTimeStamp() int64

func (Stats) PktCongestionWindow

func (ss Stats) PktCongestionWindow() int

func (Stats) PktFlightSize

func (ss Stats) PktFlightSize() int

func (Stats) PktFlowWindow

func (ss Stats) PktFlowWindow() int

func (Stats) PktRcvAvgBelatedTime

func (ss Stats) PktRcvAvgBelatedTime() float64

func (Stats) PktRcvBelated

func (ss Stats) PktRcvBelated() int64

func (Stats) PktRcvBuf

func (ss Stats) PktRcvBuf() int

func (Stats) PktRcvDrop

func (ss Stats) PktRcvDrop() int

func (Stats) PktRcvDropTotal

func (ss Stats) PktRcvDropTotal() int

func (Stats) PktRcvFilterExtra

func (ss Stats) PktRcvFilterExtra() int

func (Stats) PktRcvFilterExtraTotal

func (ss Stats) PktRcvFilterExtraTotal() int

func (Stats) PktRcvFilterLoss

func (ss Stats) PktRcvFilterLoss() int

func (Stats) PktRcvFilterLossTotal

func (ss Stats) PktRcvFilterLossTotal() int

func (Stats) PktRcvFilterSupply

func (ss Stats) PktRcvFilterSupply() int

func (Stats) PktRcvFilterSupplyTotal

func (ss Stats) PktRcvFilterSupplyTotal() int

func (Stats) PktRcvLoss

func (ss Stats) PktRcvLoss() int

func (Stats) PktRcvLossTotal

func (ss Stats) PktRcvLossTotal() int

func (Stats) PktRcvRetrans

func (ss Stats) PktRcvRetrans() int

func (Stats) PktRcvUndecrypt

func (ss Stats) PktRcvUndecrypt() int

func (Stats) PktRcvUndecryptTotal

func (ss Stats) PktRcvUndecryptTotal() int

func (Stats) PktRecv

func (ss Stats) PktRecv() int64

func (Stats) PktRecvACK

func (ss Stats) PktRecvACK() int

func (Stats) PktRecvACKTotal

func (ss Stats) PktRecvACKTotal() int

func (Stats) PktRecvNAK

func (ss Stats) PktRecvNAK() int

func (Stats) PktRecvNAKTotal

func (ss Stats) PktRecvNAKTotal() int

func (Stats) PktRecvTotal

func (ss Stats) PktRecvTotal() int64

func (Stats) PktRecvUnique

func (ss Stats) PktRecvUnique() int64

func (Stats) PktRecvUniqueTotal

func (ss Stats) PktRecvUniqueTotal() int64

func (Stats) PktReorderDistance

func (ss Stats) PktReorderDistance() int

func (Stats) PktReorderTolerance

func (ss Stats) PktReorderTolerance() int

func (Stats) PktRetrans

func (ss Stats) PktRetrans() int

func (Stats) PktRetransTotal

func (ss Stats) PktRetransTotal() int

func (Stats) PktSent

func (ss Stats) PktSent() int64

func (Stats) PktSentACK

func (ss Stats) PktSentACK() int

func (Stats) PktSentACKTotal

func (ss Stats) PktSentACKTotal() int

func (Stats) PktSentNAK

func (ss Stats) PktSentNAK() int

func (Stats) PktSentNAKTotal

func (ss Stats) PktSentNAKTotal() int

func (Stats) PktSentTotal

func (ss Stats) PktSentTotal() int64

func (Stats) PktSentUnique

func (ss Stats) PktSentUnique() int64

func (Stats) PktSentUniqueTotal

func (ss Stats) PktSentUniqueTotal() int64

func (Stats) PktSndBuf

func (ss Stats) PktSndBuf() int

func (Stats) PktSndDrop

func (ss Stats) PktSndDrop() int

func (Stats) PktSndDropTotal

func (ss Stats) PktSndDropTotal() int

func (Stats) PktSndFilterExtra

func (ss Stats) PktSndFilterExtra() int

func (Stats) PktSndFilterExtraTotal

func (ss Stats) PktSndFilterExtraTotal() int

func (Stats) PktSndLoss

func (ss Stats) PktSndLoss() int

func (Stats) PktSndLossTotal

func (ss Stats) PktSndLossTotal() int

func (Stats) UsPktSndPeriod

func (ss Stats) UsPktSndPeriod() float64

func (Stats) UsSndDuration

func (ss Stats) UsSndDuration() int64

func (Stats) UsSndDurationTotal

func (ss Stats) UsSndDurationTotal() int64

type StreamID added in v0.2.0

type StreamID map[StreamIDKey]StreamIDItem

func ParseStreamID added in v0.2.0

func ParseStreamID(str string) (s StreamID, err error)

func (StreamID) MarshalText added in v0.2.0

func (s StreamID) MarshalText() ([]byte, error)

func (StreamID) String added in v0.2.0

func (s StreamID) String() (str string)

func (*StreamID) UnmarshalText added in v0.2.0

func (s *StreamID) UnmarshalText(b []byte) (err error)

type StreamIDItem added in v0.2.0

type StreamIDItem struct {
	Children map[StreamIDKey]StreamIDItem
	Value    string
}

type StreamIDKey added in v0.2.0

type StreamIDKey string
const (
	StreamIDKeyHostName      StreamIDKey = "h"
	StreamIDKeyMode          StreamIDKey = "m"
	StreamIDKeyRessourceName StreamIDKey = "r"
	StreamIDKeySessionID     StreamIDKey = "s"
	StreamIDKeyType          StreamIDKey = "t"
	StreamIDKeyUserName      StreamIDKey = "u"
)

type Transtype

type Transtype int32

Jump to

Keyboard shortcuts

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