Exemplo n.º 1
0
        public void Send(RequestBase request, CustomIPEndPoint endPoint)
        {
            var socket = SetupSocket(endPoint.Ip, endPoint.Port);

            _serializationService.SerializeToStream(new NetworkStream(socket), request);

            socket.Shutdown(SocketShutdown.Send);
        }
Exemplo n.º 2
0
        public void Handle(RequestBase request)
        {
            var executor = _executorByRequestType[request.GetType()].Invoke(request);

            if (executor != null)
            {
                executor.Execute();
            }
        }