Documentation ¶
Index ¶
- type LNAdr
- type LNDConn
- func (c *LNDConn) Close() error
- func (c *LNDConn) Dial(myId *btcec.PrivateKey, address string, remoteId []byte) error
- func (c *LNDConn) LocalAddr() net.Addr
- func (c *LNDConn) Read(b []byte) (n int, err error)
- func (c *LNDConn) RemoteAddr() net.Addr
- func (c *LNDConn) SetDeadline(t time.Time) error
- func (c *LNDConn) SetReadDeadline(t time.Time) error
- func (c *LNDConn) SetWriteDeadline(t time.Time) error
- func (c *LNDConn) Write(b []byte) (n int, err error)
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LNAdr ¶
type LNAdr struct { LnID [16]byte // redundant because adr contains it PubKey *btcec.PublicKey Base58Adr btcutil.Address // Base58 encoded address (1XXX...) NetAddr *net.TCPAddr // IP address // contains filtered or unexported fields }
lnAddr...
func (*LNAdr) Deserialize ¶
Deserialize an LNId from byte slice (on disk) Note that this does not check any internal consistency, because on local storage there's no point. Check separately if needed. Also, old and probably needs to be changed / updated
type LNDConn ¶
type LNDConn struct { RemotePub *btcec.PublicKey RemoteLNId [16]byte // If Authed == false, the remotePub is the EPHEMERAL key. // once authed == true, remotePub is who you're actually talking to. Authed bool // ViaPbx specifies whether this is a direct TCP connection or an // encapsulated PBX connection. // If going ViaPbx, Cn isn't used channels are used for Read() and // Write(), which are filled by the PBXhandler. ViaPbx bool PbxIncoming chan []byte PbxOutgoing chan []byte Conn net.Conn // contains filtered or unexported fields }
Conn...
func (*LNDConn) Close ¶
Close closes the connection. Any blocked Read or Write operations will be unblocked and return errors. Part of the net.Conn interface.
func (*LNDConn) LocalAddr ¶
LocalAddr returns the local network address. Part of the net.Conn interface. If PBX reports address of pbx host.
func (*LNDConn) Read ¶
Read reads data from the connection. Read can be made to time out and return a Error with Timeout() == true after a fixed time limit; see SetDeadline and SetReadDeadline. Part of the net.Conn interface.
func (*LNDConn) RemoteAddr ¶
RemoteAddr returns the remote network address. Part of the net.Conn interface.
func (*LNDConn) SetDeadline ¶
SetDeadline sets the read and write deadlines associated with the connection. It is equivalent to calling both SetReadDeadline and SetWriteDeadline. Part of the net.Conn interface.
func (*LNDConn) SetReadDeadline ¶
SetReadDeadline sets the deadline for future Read calls. A zero value for t means Read will not time out. Part of the net.Conn interface.
func (*LNDConn) SetWriteDeadline ¶
SetWriteDeadline sets the deadline for future Write calls. Even if write times out, it may return n > 0, indicating that some of the data was successfully written. A zero value for t means Write will not time out. Part of the net.Conn interface.
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener...
func NewListener ¶
func NewListener(localPriv *btcec.PrivateKey, listenAddr string) (*Listener, error)
NewListener...
func (*Listener) Accept ¶
Accept waits for and returns the next connection to the listener. Part of the net.Listener interface.