Navigation | Overlay |
---|---|
t Navigate files | h Toggle hits |
y Change url to tip of branch | m Toggle misses |
b / v Jump to prev/next hit line | p Toggle partial |
z / x Jump to prev/next missed or partial line | 1..9 Toggle flags |
shift + o Open current page in GitHub | a Toggle all on |
/ or ? Show keyboard shortcuts dialog | c Toggle context lines or commits |
1 |
using System.Text; |
|
2 |
|
|
3 |
namespace Libplanet.Stun.Attributes |
|
4 |
{
|
|
5 |
public class Software : Attribute |
|
6 |
{
|
|
7 | 1 |
public Software(string value) |
8 | 1 |
{
|
9 | 1 |
Value = value; |
10 | 1 |
}
|
11 |
|
|
12 | 1 |
public override AttributeType Type => AttributeType.Software; |
13 |
|
|
14 | 1 |
public string Value { get; } |
15 |
|
|
16 |
internal static Software Parse(byte[] payload) |
|
17 | 1 |
{
|
18 | 1 |
return new Software(Encoding.ASCII.GetString(payload)); |
19 | 1 |
}
|
20 |
|
|
21 |
protected override byte[] EncodePayload(byte[] transactionId) |
|
22 | 1 |
{
|
23 | 1 |
return Encoding.ASCII.GetBytes(Value); |
24 | 1 |
}
|
25 |
}
|
|
26 |
}
|
Read our documentation on viewing source code .