using System.Net.Sockets;

namespace eSuite.API.HealthChecks;

/// <summary>
/// Factory class used to create sockets
/// </summary>
public class SocketFactory : ISocketFactory
{
    /// <summary>
    /// Create a new socket using the parameters provided.
    /// </summary>
    /// <param name="endPointAddressFamily"></param>
    /// <param name="stream"></param>
    /// <param name="tcp"></param>
    /// <returns></returns>
    public ISocketFacade CreateSocket(AddressFamily endPointAddressFamily, SocketType stream, ProtocolType tcp)
    {
        return new SocketFacade(endPointAddressFamily, stream, tcp);
    }
}