aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Transport/Discovery/ICommunicationScanner.cs
blob: bdf27d4df32e1f13309524e518be80fc51433c2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using Google.Protobuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.Transport.Discovery
{
    /// <summary>
    /// Represents a communication scanner.
    /// </summary>
    /// <typeparam name="TAdapter">The type of the adapter.</typeparam>
    /// <typeparam name="TRequest">The type of the request.</typeparam>
    /// <typeparam name="TResponse">The type of the response.</typeparam>
    public interface ICommunicationScanner<TAdapter, TRequest, TResponse> where TAdapter : ITransportAdapter where TRequest : IMessage where TResponse : IMessage
    {
        /// <summary>
        /// Scans the environment with the specified request while expecting the type of response.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="timeout">The timeout.</param>
        /// <returns></returns>
        Task<CommunicationScannerResult<TAdapter, TResponse>> Scan(TRequest request, TimeSpan timeout);
    }
}