Versions in this module Expand all Collapse all v0 v0.0.14 Feb 9, 2019 Changes in this version + const IKCP_ACK_FAST + const IKCP_ASK_SEND + const IKCP_ASK_TELL + const IKCP_CMD_ACK + const IKCP_CMD_PUSH + const IKCP_CMD_WASK + const IKCP_CMD_WINS + const IKCP_DEADLINK + const IKCP_INTERVAL + const IKCP_MTU_DEF + const IKCP_OVERHEAD + const IKCP_PROBE_INIT + const IKCP_PROBE_LIMIT + const IKCP_RTO_DEF + const IKCP_RTO_MAX + const IKCP_RTO_MIN + const IKCP_RTO_NDL + const IKCP_THRESH_INIT + const IKCP_THRESH_MIN + const IKCP_WND_RCV + const IKCP_WND_SND + func Dial(raddr string) (net.Conn, error) + func Listen(laddr string) (net.Listener, error) + type BlockCrypt interface + Decrypt func(dst, src []byte) + Encrypt func(dst, src []byte) + func NewAESBlockCrypt(key []byte) (BlockCrypt, error) + func NewBlowfishBlockCrypt(key []byte) (BlockCrypt, error) + func NewCast5BlockCrypt(key []byte) (BlockCrypt, error) + func NewNoneBlockCrypt(key []byte) (BlockCrypt, error) + func NewSM4BlockCrypt(key []byte) (BlockCrypt, error) + func NewSalsa20BlockCrypt(key []byte) (BlockCrypt, error) + func NewSimpleXORBlockCrypt(key []byte) (BlockCrypt, error) + func NewTEABlockCrypt(key []byte) (BlockCrypt, error) + func NewTripleDESBlockCrypt(key []byte) (BlockCrypt, error) + func NewTwofishBlockCrypt(key []byte) (BlockCrypt, error) + func NewXTEABlockCrypt(key []byte) (BlockCrypt, error) + type Entropy interface + Fill func(nonce []byte) + Init func() + type KCP struct + func NewKCP(conv uint32, output output_callback) *KCP + func (kcp *KCP) Check() uint32 + func (kcp *KCP) Input(data []byte, regular, ackNoDelay bool) int + func (kcp *KCP) NoDelay(nodelay, interval, resend, nc int) int + func (kcp *KCP) PeekSize() (length int) + func (kcp *KCP) Recv(buffer []byte) (n int) + func (kcp *KCP) Send(buffer []byte) int + func (kcp *KCP) SetMtu(mtu int) int + func (kcp *KCP) Update() + func (kcp *KCP) WaitSnd() int + func (kcp *KCP) WndSize(sndwnd, rcvwnd int) int + type Listener struct + func ListenWithOptions(laddr string, block BlockCrypt, dataShards, parityShards int) (*Listener, error) + func ServeConn(block BlockCrypt, dataShards, parityShards int, conn net.PacketConn) (*Listener, error) + func (l *Listener) Accept() (net.Conn, error) + func (l *Listener) AcceptKCP() (*UDPSession, error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + func (l *Listener) SetDSCP(dscp int) error + func (l *Listener) SetDeadline(t time.Time) error + func (l *Listener) SetReadBuffer(bytes int) error + func (l *Listener) SetReadDeadline(t time.Time) error + func (l *Listener) SetWriteBuffer(bytes int) error + func (l *Listener) SetWriteDeadline(t time.Time) error + type Snmp struct + ActiveOpens uint64 + BytesReceived uint64 + BytesSent uint64 + CurrEstab uint64 + EarlyRetransSegs uint64 + FECErrs uint64 + FECParityShards uint64 + FECRecovered uint64 + FECShortShards uint64 + FastRetransSegs uint64 + InBytes uint64 + InCsumErrors uint64 + InErrs uint64 + InPkts uint64 + InSegs uint64 + KCPInErrors uint64 + LostSegs uint64 + MaxConn uint64 + OutBytes uint64 + OutPkts uint64 + OutSegs uint64 + PassiveOpens uint64 + RepeatSegs uint64 + RetransSegs uint64 + var DefaultSnmp *Snmp + func (s *Snmp) Copy() *Snmp + func (s *Snmp) Header() []string + func (s *Snmp) Reset() + func (s *Snmp) ToSlice() []string + type UDPSession struct + func DialWithOptions(raddr string, block BlockCrypt, dataShards, parityShards int) (*UDPSession, error) + func NewConn(raddr string, block BlockCrypt, dataShards, parityShards int, ...) (*UDPSession, error) + func (s *UDPSession) Close() error + func (s *UDPSession) GetConv() uint32 + func (s *UDPSession) LocalAddr() net.Addr + func (s *UDPSession) Read(b []byte) (n int, err error) + func (s *UDPSession) RemoteAddr() net.Addr + func (s *UDPSession) SetACKNoDelay(nodelay bool) + func (s *UDPSession) SetDSCP(dscp int) error + func (s *UDPSession) SetDUP(dup int) + func (s *UDPSession) SetDeadline(t time.Time) error + func (s *UDPSession) SetMtu(mtu int) bool + func (s *UDPSession) SetNoDelay(nodelay, interval, resend, nc int) + func (s *UDPSession) SetReadBuffer(bytes int) error + func (s *UDPSession) SetReadDeadline(t time.Time) error + func (s *UDPSession) SetStreamMode(enable bool) + func (s *UDPSession) SetWindowSize(sndwnd, rcvwnd int) + func (s *UDPSession) SetWriteBuffer(bytes int) error + func (s *UDPSession) SetWriteDeadline(t time.Time) error + func (s *UDPSession) SetWriteDelay(delay bool) + func (s *UDPSession) Write(b []byte) (n int, err error)