Versions in this module Expand all Collapse all v0 v0.0.1 Jan 14, 2019 Changes in this version + const DefaultRcvWnd + const HeaderSize + const MaxReceivePacketSize + const MaxSegmentSize + var ErrClosedForReceive = errors.New("connection is closed for receive") + var ErrClosedForSend = errors.New("connection is closed for send") + var ErrConnectionAborted = errors.New("connection aborted") + var ErrConnectionClosed = errors.New("connection closed") + var ErrConnectionReset = errors.New("connection reset by peer") + var ErrIllegalSegment = errors.New("illegal segment") + var ErrNoCipher = errors.New("cipher is nil") + var ErrTimeout = errors.New("operation timed out") + type BytesPool struct + func NewBytesPool(space int) *BytesPool + func (p *BytesPool) Get() []byte + func (p *BytesPool) Put(b []byte) + type Cipher struct + func NewCipher(key []byte) (c *Cipher, err error) + func (c *Cipher) Clone(flag CipherFlag) *Cipher + func (c *Cipher) Decrypt(out []byte, input []byte) + func (c *Cipher) Encrypt(out []byte, input []byte) + type CipherFlag int + const FlagDecrypt + const FlagEncrypt + type Conn = endpoint + func Dial(address string, cipher *Cipher) (c *Conn, err error) + type Listener struct + func Listen(address string, cipher *Cipher, backlog int) (l *Listener, err error) + func (l *Listener) Accept() (c *Conn, err error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + func (l *Listener) Remove(conn *Conn) + func (l *Listener) SetReadBuffer(bytes int) error + func (l *Listener) SetWriteBuffer(bytes int) error