using System.Net; using System.Net.Sockets; namespace MediaBrowser.Model.Net; /// /// Implemented by components that can create specific socket configurations. /// public interface ISocketFactory { /// /// Creates a new unicast socket using the specified local port number. /// /// The local port to bind to. /// A new unicast socket using the specified local port number. Socket CreateUdpBroadcastSocket(int localPort); /// /// Creates a new unicast socket using the specified local port number. /// /// The bind interface. /// The local port to bind to. /// A new unicast socket using the specified local port number. Socket CreateSsdpUdpSocket(IPData bindInterface, int localPort); /// /// Creates a new multicast socket using the specified multicast IP address, multicast time to live and local port. /// /// The multicast IP address to bind to. /// The bind interface. /// The multicast time to live value. Actually a maximum number of network hops for UDP packets. /// The local port to bind to. /// A new multicast socket using the specfied bind interface, multicast address, multicast time to live and port. Socket CreateUdpMulticastSocket(IPAddress multicastAddress, IPData bindInterface, int multicastTimeToLive, int localPort); }