Skip to content

Commit

Permalink
Document ConnectTCP
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoack committed Jan 15, 2024
1 parent a0b5981 commit e337b01
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions landlock/net_opt.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ type NetRule struct {
port uint16
}

// ConnectTCP is a [Rule] which grants the right to connect a socket
// to a given TCP port.
//
// In Go, the connect(2) operation is usually run as part of
// net.Dial().
func ConnectTCP(port uint16) NetRule {
return NetRule{
access: ll.AccessNetConnectTCP,
Expand Down

0 comments on commit e337b01

Please sign in to comment.