using System.Net.Sockets;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_Tasks.Workflow.Abstractions;
namespace WIDESEAWCS_Tasks.SocketServer
{
///
/// TcpSocketServer µÄÊÊÅäÆ÷ʵÏÖ£¬±£³Öµ×²ãÐÐΪ²»±ä£¬½ö×ö·ÃÎÊÊÕ¿Ú¡£
///
public class SocketClientGateway : ISocketClientGateway
{
private readonly TcpSocketServer _tcpSocket;
public SocketClientGateway(TcpSocketServer tcpSocket)
{
_tcpSocket = tcpSocket;
}
public Task SendToClientAsync(string clientId, string message)
{
return _tcpSocket.SendToClientAsync(clientId, message);
}
public Task SendMessageAsync(TcpClient client, string message)
{
return _tcpSocket.SendMessageAsync(client, message);
}
public IReadOnlyList GetClientIds()
{
return _tcpSocket.GetClientIds();
}
public Task HandleClientAsync(TcpClient client, string clientId, CancellationToken cancellationToken, RobotSocketState robotCrane)
{
return _tcpSocket.HandleClientAsync(client, clientId, cancellationToken, robotCrane);
}
}
}