4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-15 06:16:06 +00:00

Update comments

This commit is contained in:
Neil Alexander
2019-06-11 12:52:13 +01:00
parent 907986f200
commit e229ad6e2b

View File

@ -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()