Versions in this module Expand all Collapse all v1 v1.1.0 Jun 21, 2023 Changes in this version + const BestCompression + const BestSpeed + const DefaultCompression + const DefaultDialerTimeout + const MaxWriteSize + const NoCompression + var BufferTooLarge = errors.New("buffer larger than the max frame size") + var ErrBufferFull = errors.New("buffer full") + var ErrClosed = errors.New(closedNetworkErrorMessage) + func DefaultTCPListener(address string) net.Listener + func DefaultTLSConfig() *tls.Config + func IsClosedError(err error) bool + func NetDialer(options ...DialerOption) *net.Dialer + func NewChannelWriter(inner io.WriteCloser, capacity int) io.WriteCloser + func NewDisposeConnection(inner net.Conn, cleanup func(closer io.Closer)) net.Conn + func NewDisposeListener(inner net.Listener) net.Listener + func NewFrameListener(inner net.Listener) net.Listener + func NewGZipConnection(inner net.Conn, level int) (net.Conn, error) + func NewGZipListener(inner net.Listener, compressionLevel int) net.Listener + func NewTCPListener(address string) (net.Listener, error) + func NewTLSListener(inner net.Listener, config *tls.Config) net.Listener + func NewTraceConnection(inner net.Conn, name string) net.Conn + func NewTraceListener(inner net.Listener, name string) net.Listener + func TLSConfigWithPEM(filename string) (*tls.Config, error) + type ChannelWriter struct + func (this *ChannelWriter) Close() error + func (this *ChannelWriter) Write(buffer []byte) (int, error) + type DialWriter struct + func NewDialWriter(dialer Dialer, address string) *DialWriter + func (this *DialWriter) Close() (err error) + func (this *DialWriter) Write(buffer []byte) (int, error) + type Dialer interface + Dial func(string, string) (net.Conn, error) + func DefaultDialer(options ...DialerOption) Dialer + func NewFrameDialer(inner Dialer) Dialer + func NewGZipDialer(inner Dialer, options ...GZipDialerOption) Dialer + func NewTLSDialer(dialer *net.Dialer, options ...TLSDialerOption) Dialer + func NewTraceDialer(inner Dialer, name string) Dialer + type DialerOption func(this *net.Dialer) + func WithDialTimeout(timeout time.Duration) DialerOption + type DisposeConnection struct + func (this DisposeConnection) Close() error + type DisposeListener struct + func (this *DisposeListener) Accept() (net.Conn, error) + func (this *DisposeListener) Close() error + type FrameConnection struct + func NewFrameConnection(inner net.Conn) FrameConnection + func (this FrameConnection) Read(buffer []byte) (int, error) + func (this FrameConnection) ReadBody(buffer []byte) (int, error) + func (this FrameConnection) ReadHeader() (int, error) + func (this FrameConnection) Write(buffer []byte) (int, error) + type FrameDialer struct + func (this FrameDialer) Dial(network, address string) (net.Conn, error) + type FrameListener struct + func (this FrameListener) Accept() (net.Conn, error) + type GZipConnection struct + func (this GZipConnection) Close() error + func (this GZipConnection) Read(buffer []byte) (int, error) + func (this GZipConnection) Write(buffer []byte) (int, error) + type GZipDialer struct + func (this GZipDialer) Dial(network, address string) (net.Conn, error) + type GZipDialerOption func(*GZipDialer) + func WithCompressionLevel(level int) GZipDialerOption + type GZipListener struct + func (this GZipListener) Accept() (net.Conn, error) + type TCPListener struct + func (this TCPListener) Accept() (net.Conn, error) + type TLSDialer struct + func (this TLSDialer) Dial(network, address string) (net.Conn, error) + type TLSDialerOption func(*TLSDialer) + func WithTLSConfig(config *tls.Config) TLSDialerOption + func WithTLSServerName(name string) TLSDialerOption + type TraceConnection struct + func (this TraceConnection) Close() error + func (this TraceConnection) Read(buffer []byte) (int, error) + func (this TraceConnection) Write(buffer []byte) (int, error) + type TraceDialer struct + func (this TraceDialer) Dial(network, address string) (net.Conn, error) + type TraceListener struct + func (this TraceListener) Accept() (net.Conn, error)