Initial connection upgrade/TLS peering support

This commit is contained in:
Neil Alexander 2019-10-23 17:26:35 +01:00
parent 9cb553e939
commit 6a22e6c9de
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 167 additions and 27 deletions

View file

@ -280,7 +280,14 @@ func (c *Core) ConnDialer() (*Dialer, error) {
// "Listen" configuration item, e.g.
// tcp://a.b.c.d:e
func (c *Core) ListenTCP(uri string) (*TcpListener, error) {
return c.link.tcp.listen(uri)
return c.link.tcp.listen(uri, nil)
}
// ListenTLS starts a new TLS listener. The input URI should match that of the
// "Listen" configuration item, e.g.
// tls://a.b.c.d:e
func (c *Core) ListenTLS(uri string) (*TcpListener, error) {
return c.link.tcp.listen(uri, c.link.tcp.tls.forListener)
}
// NodeID gets the node ID. This is derived from your router encryption keys.