-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathServerConnectionDataEventArgs.cs
More file actions
49 lines (44 loc) · 1.42 KB
/
ServerConnectionDataEventArgs.cs
File metadata and controls
49 lines (44 loc) · 1.42 KB
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
49
namespace Waher.Networking
{
/// <summary>
/// Event arguments for server data reception events.
/// </summary>
public class ServerConnectionDataEventArgs : ServerConnectionEventArgs
{
/// <summary>
/// Event arguments for server data reception events.
/// </summary>
/// <param name="Connection">Server connection</param>
/// <param name="ConstantBuffer">If the contents of the buffer remains constant (true),
/// or if the contents in the buffer may change after the call (false).</param>
/// <param name="Buffer">Binary Data Buffer</param>
/// <param name="Offset">Start index of first byte read.</param>
/// <param name="Count">Number of bytes read.</param>
public ServerConnectionDataEventArgs(ServerTcpConnection Connection,
bool ConstantBuffer, byte[] Buffer, int Offset, int Count)
: base(Connection)
{
this.ConstantBuffer = ConstantBuffer;
this.Buffer = Buffer;
this.Offset = Offset;
this.Count = Count;
}
/// <summary>
/// If the buffer is used only for this call (true),
/// or if it will be used for multiple calls with different data (false).
/// </summary>
public bool ConstantBuffer { get; }
/// <summary>
/// Binary Data Buffer
/// </summary>
public byte[] Buffer { get; }
/// <summary>
/// Start index of first byte read.
/// </summary>
public int Offset { get; }
/// <summary>
/// Number of bytes read.
/// </summary>
public int Count { get; }
}
}