Versions in this module Expand all Collapse all v1 v1.0.3 Oct 19, 2018 v1.0.2 Aug 19, 2018 Changes in this version + const CompressBestCompression + const CompressBestSpeed + const CompressHuffman + const CompressNone + const CompressSnappy + const CompressZip + const DATE + const GETTY_BUILD + const GETTY_MAJOR + const GETTY_MINOR + const Version + var EndPointType_name = map[int32]string + var EndPointType_value = map[string]int32 + var ErrNullPeerAddr = errors.New("peer address is nil") + var ErrScheduleTimeout = fmt.Errorf("schedule error: timed out") + var ErrSessionBlocked = errors.New("session Full Blocked") + var ErrSessionClosed = errors.New("session Already Closed") + func GetTimeWheel() *gxtime.Wheel + type Client interface + func NewTCPClient(opts ...ClientOption) Client + func NewUDPClient(opts ...ClientOption) Client + func NewWSClient(opts ...ClientOption) Client + func NewWSSClient(opts ...ClientOption) Client + type ClientOption func(*ClientOptions) + func WithConnectionNumber(num int) ClientOption + func WithRootCertificateFile(cert string) ClientOption + func WithServerAddress(addr string) ClientOption + type ClientOptions struct + type CompressType int + type Connection interface + GetActive func() time.Time + ID func() uint32 + LocalAddr func() string + RemoteAddr func() string + SetCompressType func(CompressType) + SetReadTimeout func(time.Duration) + SetWriteTimeout func(time.Duration) + UpdateActive func() + Write func(interface{}) (int, error) + type EndPoint interface + Close func() + EndPointType func() EndPointType + IsClosed func() bool + RunEventLoop func(newSession NewSessionCallback) + type EndPointType int32 + const TCP_CLIENT + const TCP_SERVER + const UDP_CLIENT + const UDP_ENDPOINT + const WSS_CLIENT + const WSS_SERVER + const WS_CLIENT + const WS_SERVER + func (x EndPointType) String() string + type EventListener interface + OnClose func(Session) + OnCron func(Session) + OnError func(Session, error) + OnMessage func(Session, interface{}) + OnOpen func(Session) error + type NewSessionCallback func(Session) error + type Pool struct + func NewPool(size, queue, spawn int) *Pool + func (p *Pool) ScheduleTimeout(timeout time.Duration, task func()) error + type ReadWriter interface + type Reader interface + Read func(Session, []byte) (interface{}, int, error) + type Server interface + Listener func() net.Listener + func NewTCPServer(opts ...ServerOption) Server + func NewUDPPEndPoint(opts ...ServerOption) Server + func NewWSSServer(opts ...ServerOption) Server + func NewWSServer(opts ...ServerOption) Server + type ServerOption func(*ServerOptions) + func WithLocalAddress(addr string) ServerOption + func WithWebsocketServerCert(cert string) ServerOption + func WithWebsocketServerPath(path string) ServerOption + func WithWebsocketServerPrivateKey(key string) ServerOption + func WithWebsocketServerRootCert(cert string) ServerOption + type ServerOptions struct + type Session interface + Close func() + Conn func() net.Conn + EndPoint func() EndPoint + GetAttribute func(interface{}) interface{} + IsClosed func() bool + RemoveAttribute func(interface{}) + Reset func() + SetAttribute func(interface{}, interface{}) + SetCronPeriod func(int) + SetEventListener func(EventListener) + SetMaxMsgLen func(int) + SetName func(string) + SetPkgHandler func(ReadWriter) + SetRQLen func(int) + SetReader func(Reader) + SetWQLen func(int) + SetWaitTime func(time.Duration) + SetWriter func(Writer) + Stat func() string + WriteBytes func([]byte) error + WriteBytesArray func(...[]byte) error + WritePkg func(pkg interface{}, timeout time.Duration) error + type UDPContext struct + PeerAddr *net.UDPAddr + Pkg interface{} + func (c UDPContext) String() string + type Writer interface + Write func(Session, interface{}) error Other modules containing this package gopkg.in/dubbogo/getty.v0