namespace MediaBrowser.Model.Net { /// /// Implemented by components that can create a platform specific UDP socket implementation, and wrap it in the cross platform interface. /// public interface ISocketFactory { /// /// Createa a new unicast socket using the specified local port number. /// /// The local port to bind to. /// A implementation. ISocket CreateUdpSocket(int localPort); ISocket CreateTcpSocket(IpAddressInfo remoteAddress, int remotePort); /// /// Createa a new unicast socket using the specified local port number. /// ISocket CreateSsdpUdpSocket(IpAddressInfo localIp, int localPort); /// /// Createa 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 multicast time to live value. Actually a maximum number of network hops for UDP packets. /// The local port to bind to. /// A implementation. ISocket CreateUdpMulticastSocket(string ipAddress, int multicastTimeToLive, int localPort); IAcceptSocket CreateAcceptSocket(IpAddressFamily family, SocketType socketType, ProtocolType protocolType, bool dualMode); } public enum SocketType { Stream } public enum ProtocolType { Tcp } }