mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Update comments
This commit is contained in:
		
							parent
							
								
									907986f200
								
							
						
					
					
						commit
						e229ad6e2b
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue