File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ type Conn struct {
4545 capability uint32
4646 // client-set capabilities only
4747 ccaps uint32
48- // Flags explicitly disabled via SetCapability/UnsetCapability
48+ // Capability flags explicitly disabled by the client via UnsetCapability()
49+ // These flags are removed from the final advertised capability set during handshake.
4950 clientExplicitOffCaps uint32
5051
5152 attributes map [string ]string
@@ -236,13 +237,14 @@ func (c *Conn) Ping() error {
236237 return nil
237238}
238239
239- // SetCapability enables the use of a specific capability
240+ // SetCapability marks the specified flag as explicitly enabled by the client.
240241func (c * Conn ) SetCapability (cap uint32 ) {
241242 c .ccaps |= cap
242243 c .clientExplicitOffCaps &^= cap
243244}
244245
245- // UnsetCapability disables the use of a specific capability
246+ // UnsetCapability marks the specified flag as explicitly disabled by the client.
247+ // This disables the flag even if the server supports it.
246248func (c * Conn ) UnsetCapability (cap uint32 ) {
247249 c .ccaps &^= cap
248250 c .clientExplicitOffCaps |= cap
You can’t perform that action at this time.
0 commit comments