Class SocketFactory
Used by RSSDP components to create implementations of the IUdpSocket interface, to perform platform agnostic socket communications.
Inheritance
Implements
Inherited Members
Namespace: Rssdp
Assembly: cs.temp.dll.dll
Syntax
public sealed class SocketFactory : ISocketFactory
Constructors
SocketFactory(String)
Default constructor.
Declaration
public SocketFactory(string ipAddress)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | ipAddress | The IP address of the local network adapter to bind sockets to.
Null or empty string will use |
Properties
DeviceNetworkType
What type of sockets will be created: ipv6 or ipv4
Declaration
public DeviceNetworkType DeviceNetworkType { get; }
Property Value
| Type | Description |
|---|---|
| DeviceNetworkType |
Methods
CreateUdpMulticastSocket(Int32, Int32)
Creates a new UDP socket that is a member of the specified multicast IP address, and binds it to the specified local port.
Declaration
public IUdpSocket CreateUdpMulticastSocket(int multicastTimeToLive, int localPort)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | multicastTimeToLive | The multicast time to live value for the socket. |
| System.Int32 | localPort | The number of the local port to bind to. |
Returns
| Type | Description |
|---|---|
| IUdpSocket |
CreateUdpSocket(Int32)
Creates a new UDP socket that is a member of the SSDP multicast local admin group and binds it to the specified local port.
Declaration
public IUdpSocket CreateUdpSocket(int localPort)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | localPort | An integer specifying the local port to bind the socket to. |
Returns
| Type | Description |
|---|---|
| IUdpSocket | An implementation of the IUdpSocket interface used by RSSDP components to perform socket operations. |