Documentation ¶
Index ¶
- Variables
- func New(handler Handler, inflightSize int) (io.Closer, chan<- Transport)
- type Handler
- type Session
- func (s *Session) Close() error
- func (s *Session) ConnAck(returnCode int32) error
- func (s *Session) Connect() *packet.Connect
- func (s *Session) ID() string
- func (s *Session) OnClosed(f func()) func()
- func (s *Session) OnLost(f func()) func()
- func (s *Session) OnPublish(f func(packet *packet.Publish)) func()
- func (s *Session) OnSubscribe(f func(packet *packet.Subscribe)) func()
- func (s *Session) OnUnsubscribe(f func(packet *packet.Unsubscribe)) func()
- func (s *Session) PubAck(mid int32) error
- func (s *Session) Publish(p *packet.Publish) error
- func (s *Session) RemoteAddress() string
- func (s *Session) SubAck(mid int32, grantedQoS []int32) error
- func (s *Session) Tenant() string
- func (s *Session) TransportName() string
- type TimeoutReadWriteCloser
- type Transport
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSessionDisconnected = errors.New("session disconnected")
)
Functions ¶
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) OnSubscribe ¶ added in v0.0.9
func (*Session) OnUnsubscribe ¶ added in v0.0.9
func (s *Session) OnUnsubscribe(f func(packet *packet.Unsubscribe)) func()
func (*Session) RemoteAddress ¶ added in v0.0.10
func (*Session) TransportName ¶ added in v0.0.9
type TimeoutReadWriteCloser ¶
type TimeoutReadWriteCloser interface { SetDeadline(time.Time) error io.ReadWriteCloser }
type Transport ¶
type Transport interface { io.Closer Name() string Encrypted() bool EncryptionState() *tls.ConnectionState Channel() TimeoutReadWriteCloser RemoteAddress() string }
Click to show internal directories.
Click to hide internal directories.