예제 #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);
        }
        public void Send(ResponseBase response, CustomIPEndPoint responseEndPoint)
        {
            var socket = new Socket(SocketType.Stream, ProtocolType.Tcp);
           
            socket.Connect(new IPEndPoint(responseEndPoint.Ip, responseEndPoint.Port));

            _serializationService.SerializeToStream(new NetworkStream(socket), response);
            socket.Shutdown(SocketShutdown.Send);
        }
예제 #3
0
 public DownloadFileQuery(CustomIPEndPoint responsEndPoint) : base(responsEndPoint)
 {
 }
예제 #4
0
 public QueryBase(CustomIPEndPoint responsEndPoint)
 {
     ResponseEndPoint = responsEndPoint;
 }
예제 #5
0
 public ConnectionQuery(CustomIPEndPoint responseEndPoint) : base(responseEndPoint)
 {
 }
예제 #6
0
 public GetFileNamesQuery(CustomIPEndPoint responseEndPoint) : base(responseEndPoint)
 {
 }