mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-24 00:37:49 +00:00
Update comments
This commit is contained in:
parent
907986f200
commit
e229ad6e2b
@ -398,8 +398,9 @@ func (c *Core) GetNodeInfo(keyString, coordString string, nocache bool) (NodeInf
|
||||
// SetSessionGatekeeper allows you to configure a handler function for deciding
|
||||
// whether a session should be allowed or not. The default session firewall is
|
||||
// implemented in this way. The function receives the public key of the remote
|
||||
// side, and a boolean which is true if we initiated the session or false if we
|
||||
// received an incoming session request.
|
||||
// side and a boolean which is true if we initiated the session or false if we
|
||||
// received an incoming session request. The function should return true to
|
||||
// allow the session or false to reject it.
|
||||
func (c *Core) SetSessionGatekeeper(f func(pubkey *crypto.BoxPubKey, initiator bool) bool) {
|
||||
c.sessions.isAllowedMutex.Lock()
|
||||
defer c.sessions.isAllowedMutex.Unlock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user