TorSocks5Request: Add xml doc.
MODIFY
WalletWasabi/Tor/Socks5/Models/Messages/TorSocks5Request.cs
WalletWasabi/Tor/Socks5/Models/Messages/TorSocks5Request.cs
@@ -6,6 +6,20 @@ using WalletWasabi.Tor.Socks5.Models.Fields.OctetFields;
namespace WalletWasabi.Tor.Socks5.Models.Messages
{
+ /// <summary>
+ /// SOCKS5 request representation.
+ /// </summary>
+ /// <remarks>
+ /// <code>
+ /// The SOCKS request is formed as follows:
+ /// +----+-----+-------+------+----------+----------+
+ /// |VER | CMD | RSV | ATYP | DST.ADDR | DST.PORT |
+ /// +----+-----+-------+------+----------+----------+
+ /// | 1 | 1 | X'00' | 1 | Variable | 2 |
+ /// +----+-----+-------+------+----------+----------+
+ /// </code>
+ /// </remarks>
+ /// <seealso href="https://tools.ietf.org/html/rfc1928">Section 4. Requests</seealso>
public class TorSocks5Request : ByteArraySerializableBase
{
public TorSocks5Request(byte[] bytes)
@@ -31,8 +45,6 @@ namespace WalletWasabi.Tor.Socks5.Models.Messages
Atyp = dstAddr.Atyp;
}
- #region PropertiesAndMembers
-
public VerField Ver { get; }
public CmdField Cmd { get; }
@@ -45,12 +57,6 @@ namespace WalletWasabi.Tor.Socks5.Models.Messages
public PortField DstPort { get; }
- #endregion PropertiesAndMembers
-
- #region Serialization
-
public override byte[] ToBytes() => ByteHelpers.Combine(new byte[] { Ver.ToByte(), Cmd.ToByte(), Rsv.ToByte(), Atyp.ToByte() }, DstAddr.ToBytes(), DstPort.ToBytes());
-
- #endregion Serialization
}
}

TorSocks5Request: Add xml doc.