blob: 5e6b528c2764a9a777291466ee29164f2b9be422 (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tango.Transport
{
/// <summary>
/// Represents a transport adapter capable of connecting, writing and receiving data from a stream.
/// </summary>
/// <seealso cref="Tango.Transport.ITransportComponent" />
public interface ITransportAdapter : ITransportComponent
{
/// <summary>
/// Gets the total bytes received.
/// </summary>
long TotalBytesReceived { get; }
/// <summary>
/// Gets the total bytes sent.
/// </summary>
long TotalBytesSent { get; }
/// <summary>
/// Gets the adapter current transfer rate.
/// </summary>
long TransferRate { get; }
/// <summary>
/// Writes the specified data to the stream.
/// </summary>
/// <param name="data">The data.</param>
void Write(byte[] data);
/// <summary>
/// Occurs when new data is available.
/// </summary>
event EventHandler<byte[]> DataAvailable;
/// <summary>
/// Gets or sets the adapter address.
/// </summary>
String Address { get; set; }
}
}
|