Documentation ¶
Index ¶
- Variables
- type ApiConnection
- func GetConnection(conn net.Conn, communicationTimeout time.Duration, encryptionKey string) (ApiConnection, error)
- func NewEncryptedConnection(conn net.Conn, communicationTimeout time.Duration, encryptionKey string) (ApiConnection, error)
- func NewPlaintextConnection(conn net.Conn, communicationTimeout time.Duration) (ApiConnection, error)
- type EncryptedConnection
- type PlaintextConnection
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ApiConnection ¶
type ApiConnection interface { Write(message proto.Message) error Read(reader *bufio.Reader) (proto.Message, error) Handshake() error }
func GetConnection ¶
func NewEncryptedConnection ¶
func NewPlaintextConnection ¶
type EncryptedConnection ¶
type EncryptedConnection struct { CommunicationTimeout time.Duration // contains filtered or unexported fields }
encryption is based on noise protocol reference: https://noiseprotocol.org
func (*EncryptedConnection) Handshake ¶
func (ec *EncryptedConnection) Handshake() error
handshake implemented based on python implementation reference: https://github.com/esphome/aioesphomeapi/blob/main/aioesphomeapi/_frame_helper.py#L250
type PlaintextConnection ¶
type PlaintextConnection struct { CommunicationTimeout time.Duration // contains filtered or unexported fields }
func (*PlaintextConnection) Handshake ¶
func (ptc *PlaintextConnection) Handshake() error
Click to show internal directories.
Click to hide internal directories.