Versions in this module Expand all Collapse all v0 v0.0.3 Sep 11, 2024 Changes in this version + const ActOneSize + const ActThreeSize + const ActTwoSize + const HandshakeVersion + var ErrMaxMessageLengthExceeded = errors.New(...) + var ErrMessageNotFlushed = errors.New("prior message not flushed") + func EphemeralGenerator(gen func() (*btcec.PrivateKey, error)) func(*Machine) + type Conn struct + func Dial(local keychain.SingleKeyECDH, netAddr *lnwire.NetAddress, ...) (*Conn, error) + func (c *Conn) Close() error + func (c *Conn) Flush() (int, error) + func (c *Conn) LocalAddr() net.Addr + func (c *Conn) LocalPub() *btcec.PublicKey + func (c *Conn) Read(b []byte) (n int, err error) + func (c *Conn) ReadNextBody(buf []byte) ([]byte, error) + func (c *Conn) ReadNextHeader() (uint32, error) + func (c *Conn) ReadNextMessage() ([]byte, error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) RemotePub() *btcec.PublicKey + func (c *Conn) SetDeadline(t time.Time) error + func (c *Conn) SetReadDeadline(t time.Time) error + func (c *Conn) SetWriteDeadline(t time.Time) error + func (c *Conn) Write(b []byte) (n int, err error) + func (c *Conn) WriteMessage(b []byte) error + type Listener struct + func NewListener(localStatic keychain.SingleKeyECDH, listenAddr string) (*Listener, error) + func (l *Listener) Accept() (net.Conn, error) + func (l *Listener) Addr() net.Addr + func (l *Listener) Close() error + type Machine struct + func NewBrontideMachine(initiator bool, localKey keychain.SingleKeyECDH, remotePub *btcec.PublicKey, ...) *Machine + func (b *Machine) Flush(w io.Writer) (int, error) + func (b *Machine) GenActOne() ([ActOneSize]byte, error) + func (b *Machine) GenActThree() ([ActThreeSize]byte, error) + func (b *Machine) GenActTwo() ([ActTwoSize]byte, error) + func (b *Machine) ReadBody(r io.Reader, buf []byte) ([]byte, error) + func (b *Machine) ReadHeader(r io.Reader) (uint32, error) + func (b *Machine) ReadMessage(r io.Reader) ([]byte, error) + func (b *Machine) RecvActOne(actOne [ActOneSize]byte) error + func (b *Machine) RecvActThree(actThree [ActThreeSize]byte) error + func (b *Machine) RecvActTwo(actTwo [ActTwoSize]byte) error + func (b *Machine) WriteMessage(p []byte) error