Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NIOBSDSocket.Option for SO_BROADCAST #2678

Merged
merged 1 commit into from Mar 11, 2024
Merged

Conversation

rauhul
Copy link
Contributor

@rauhul rauhul commented Mar 11, 2024

This change allows users to setup a broadcast socket using a NIO owned constant instead of directly using a C constant.

- .channelOption(ChannelOptions.socket(SOL_SOCKET, SO_BROADCAST), value: 1)
+ .channelOption(ChannelOptions.socketOption(.so_broadcast), value: 1)

Fixes #2674

This change allows users to setup a broadcast socket using a NIO owned
constant instead of directly using a C constant.

```diff
- .channelOption(ChannelOptions.socket(SOL_SOCKET, SO_BROADCAST), value: 1)
+ .channelOption(ChannelOptions.socketOption(.so_broadcast), value: 1)
```

Fixes apple#2674
@Lukasa
Copy link
Contributor

Lukasa commented Mar 11, 2024

@swift-server-bot add to allowlist

@Lukasa Lukasa merged commit dc296f2 into apple:main Mar 11, 2024
9 checks passed
@rauhul rauhul deleted the add-so-broadcast branch March 11, 2024 21:34
@glbrntt glbrntt added the 🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0 label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔼 needs-minor-version-bump For PRs that when merged cause a bump of the minor version, ie. 1.x.0 -> 1.(x+1).0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add NIOBSDSocket.Option for SO_BROADCAST
3 participants