Documentation ¶
Index ¶
- type API
- type Connection
- func (c *Connection) Close() error
- func (c *Connection) GetDevice() *model.Device
- func (c *Connection) IsRegistered() bool
- func (c *Connection) Read(data []byte) (int, error)
- func (c *Connection) RemoteAddr() net.Addr
- func (c *Connection) SetDeadline(t time.Time) error
- func (c *Connection) SetReadDeadline(t time.Time) error
- func (c *Connection) SetWriteDeadline(t time.Time) error
- func (c *Connection) Write(data []byte) (int, error)
- type HelloRequest
- type Message
- type MessageType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection links connection and device.
func (*Connection) GetDevice ¶
func (c *Connection) GetDevice() *model.Device
GetDevice returns assocciated device.
func (*Connection) IsRegistered ¶
func (c *Connection) IsRegistered() bool
IsRegistered show the device has been authenticated and active.
func (*Connection) SetDeadline ¶
func (c *Connection) SetDeadline(t time.Time) error
SetDeadline of the connection.
func (*Connection) SetReadDeadline ¶
func (c *Connection) SetReadDeadline(t time.Time) error
SetReadDeadline of the connection.
func (*Connection) SetWriteDeadline ¶
func (c *Connection) SetWriteDeadline(t time.Time) error
SetWriteDeadline of the connecton.
type HelloRequest ¶
type Message ¶
type Message struct { Type MessageType Data []byte }
Click to show internal directories.
Click to hide internal directories.