mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
read metric from urls for listen and peers
This commit is contained in:
parent
70c5b06286
commit
fd5cda6329
4 changed files with 26 additions and 31 deletions
|
@ -106,15 +106,15 @@ func (c *Core) GetSessions() []Session {
|
|||
// ListenTCP starts a new TCP listener. The input URI should match that of the
|
||||
// "Listen" configuration item, e.g.
|
||||
// tcp://a.b.c.d:e
|
||||
func (c *Core) ListenTCP(uri string) (*TcpListener, error) {
|
||||
return c.links.tcp.listen(uri, nil)
|
||||
func (c *Core) ListenTCP(uri string, metric uint8) (*TcpListener, error) {
|
||||
return c.links.tcp.listen(uri, nil, metric)
|
||||
}
|
||||
|
||||
// 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.links.tcp.listen(uri, c.links.tcp.tls.forListener)
|
||||
func (c *Core) ListenTLS(uri string, metric uint8) (*TcpListener, error) {
|
||||
return c.links.tcp.listen(uri, c.links.tcp.tls.forListener, metric)
|
||||
}
|
||||
|
||||
// Address gets the IPv6 address of the Yggdrasil node. This is always a /128
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue