Skip to content

Added DatagramSocket for Native with Polling #3582

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

Draft
wants to merge 21 commits into
base: topic/net2
Choose a base branch
from

Conversation

rahulrangers
Copy link
Contributor

@rahulrangers rahulrangers commented Jul 13, 2025

Add Datagram Socket Support with Polling

This PR adds support for datagram sockets with polling for native. The key changes include:

  • FdPollingDatagramSocket.scala: Defines an interface for datagram sockets.
  • FdPollingIpDatagramSocketsProvider.scala: Creates and binds IP-based datagram sockets.
  • IpMulticast.scala: Provides types for low-level multicast support (ip_mreq, ip_mreq_source, etc.).
  • SocketHelpers.scala:
    • Adds join, drop,block and unblock helpers for multicast.
    • Adds new SocketOptions for datagramSockets.
    • Adds setIpOption and getIpOption


import cats.effect.kernel.Resource

class DatagramSocketSuite extends Fs2Suite {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move the existing UdpSuite to the shared directory now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we can move UdpSuite to the shared directory, but the test cases are currently failing on macOS for native platform. I'll fix those issues, and then move it.

@rahulrangers rahulrangers marked this pull request as draft July 17, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants