mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-12-23 15:45:40 +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
|
// SetSessionGatekeeper allows you to configure a handler function for deciding
|
||||||
// whether a session should be allowed or not. The default session firewall is
|
// 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
|
// 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
|
// side and a boolean which is true if we initiated the session or false if we
|
||||||
// received an incoming session request.
|
// 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) {
|
func (c *Core) SetSessionGatekeeper(f func(pubkey *crypto.BoxPubKey, initiator bool) bool) {
|
||||||
c.sessions.isAllowedMutex.Lock()
|
c.sessions.isAllowedMutex.Lock()
|
||||||
defer c.sessions.isAllowedMutex.Unlock()
|
defer c.sessions.isAllowedMutex.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user