public ISendAlgorithm BuildSend(IPEndPoint connectEndPoint)
        {
            _ConnectEndPoint = connectEndPoint;

            CheckSend();

            IShareClientSocket socket = _Socket;

            if (socket == null)
            {
                socket = CreateUdpSocket();
            }

            return(new InternalSendAlgorithm(ClientSpec, ShareAlgorithmManager, socket));
        }
        public IRecieveAlgorithm BuildRecieve(IPEndPoint localEndPoint)
        {
            _LocalEndPoint = localEndPoint;

            CheckRecieve();

            IShareClientSocket socket = _Socket;

            if (socket == null)
            {
                socket = CreateUdpSocket();
            }

            return(new InternalRecieveAlgorithm(ClientSpec, ShareAlgorithmManager, socket));
        }
예제 #3
0
 public InternalRecieveAlgorithm(ShareClientSpec clientSpec, IShareAlgorithmManager manager, IShareClientSocket socket)
 {
     _ClientSpec = clientSpec;
     _Manager    = manager;
     _Socket     = socket;
 }
 public ShareAlgorithmBuilder SetSocket(IShareClientSocket socket)
 {
     _Socket = socket ?? throw new ArgumentNullException(nameof(socket));
     return(this);
 }