# < Summary

Information

Class: | Renci.SshNet.Messages.Connection.RequestSuccessMessage
Assembly: | Renci.SshNet
File(s): | \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Connection\RequestSuccessMessage.cs

Line coverage
29%

Covered lines: | 9
Uncovered lines: | 22
Coverable lines: | 31
Total lines: | 78
Line coverage: | 29%

Branch coverage
16%

Covered branches: | 1
Total branches: | 6
Branch coverage: | 16.6%

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
get_BoundPort() | 100% | 1 | 0%
get_BufferCapacity() | 0% | 2 | 0%
.ctor() | 100% | 1 | 100%
.ctor(...) | 100% | 1 | 0%
LoadData() | 50% | 2 | 50%
SaveData() | 0% | 2 | 0%
Process(...) | 100% | 1 | 100%

# File(s)

## \home\appveyor\projects\ssh-net\src\Renci.SshNet\Messages\Connection\RequestSuccessMessage.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `namespace Renci.SshNet.Messages.Connection`
|  | `2` |  | `{`
|  | `3` |  | `/// <summary>`
|  | `4` |  | `/// Represents SSH_MSG_REQUEST_SUCCESS message.`
|  | `5` |  | `/// </summary>`
|  | `6` |  | `[Message("SSH_MSG_REQUEST_SUCCESS", 81)]`
|  | `7` |  | `public class RequestSuccessMessage : Message`
|  | `8` |  | `{`
|  | `9` |  | `/// <summary>`
|  | `10` |  | `/// Gets the bound port.`
|  | `11` |  | `/// </summary>`
| 0 | `12` |  | `public uint? BoundPort { get; private set; }`
|  | `13` |  | ``
|  | `14` |  | `/// <summary>`
|  | `15` |  | `/// Gets the size of the message in bytes.`
|  | `16` |  | `/// </summary>`
|  | `17` |  | `/// <value>`
|  | `18` |  | `/// The size of the messages in bytes.`
|  | `19` |  | `/// </value>`
|  | `20` |  | `protected override int BufferCapacity`
|  | `21` |  | `{`
|  | `22` |  | `get`
| 0 | `23` |  | `{`
| 0 | `24` |  | `var capacity = base.BufferCapacity;`
|  | `25` |  | ``
| 0 | `26` |  | `if (BoundPort.HasValue)`
| 0 | `27` |  | `{`
| 0 | `28` |  | `capacity += 4; // BoundPort`
| 0 | `29` |  | `}`
|  | `30` |  | ``
| 0 | `31` |  | `return capacity;`
| 0 | `32` |  | `}`
|  | `33` |  | `}`
|  | `34` |  | ``
|  | `35` |  | `/// <summary>`
|  | `36` |  | `/// Initializes a new instance of the <see cref="RequestSuccessMessage"/> class.`
|  | `37` |  | `/// </summary>`
| 223 | `38` |  | `public RequestSuccessMessage()`
| 223 | `39` |  | `{`
| 223 | `40` |  | `}`
|  | `41` |  | ``
|  | `42` |  | `/// <summary>`
|  | `43` |  | `/// Initializes a new instance of the <see cref="RequestSuccessMessage"/> class.`
|  | `44` |  | `/// </summary>`
|  | `45` |  | `/// <param name="boundPort">The bound port.</param>`
| 0 | `46` |  | `public RequestSuccessMessage(uint boundPort)`
| 0 | `47` |  | `{`
| 0 | `48` |  | `BoundPort = boundPort;`
| 0 | `49` |  | `}`
|  | `50` |  | ``
|  | `51` |  | `/// <summary>`
|  | `52` |  | `/// Called when type specific data need to be loaded.`
|  | `53` |  | `/// </summary>`
|  | `54` |  | `protected override void LoadData()`
| 4 | `55` |  | `{`
| 4 | `56` |  | `if (!IsEndOfData)`
| 0 | `57` |  | `{`
| 0 | `58` |  | `BoundPort = ReadUInt32();`
| 0 | `59` |  | `}`
| 4 | `60` |  | `}`
|  | `61` |  | ``
|  | `62` |  | `/// <summary>`
|  | `63` |  | `/// Called when type specific data need to be saved.`
|  | `64` |  | `/// </summary>`
|  | `65` |  | `protected override void SaveData()`
| 0 | `66` |  | `{`
| 0 | `67` |  | `if (BoundPort.HasValue)`
| 0 | `68` |  | `{`
| 0 | `69` |  | `Write(BoundPort.Value);`
| 0 | `70` |  | `}`
| 0 | `71` |  | `}`
|  | `72` |  | ``
|  | `73` |  | `internal override void Process(Session session)`
| 4 | `74` |  | `{`
| 4 | `75` |  | `session.OnRequestSuccessReceived(this);`
| 4 | `76` |  | `}`
|  | `77` |  | `}`
|  | `78` |  | `}`

# Methods/Properties

get_BoundPort()
get_BufferCapacity()
.ctor()
.ctor(System.UInt32)
LoadData()
SaveData()
Process(Renci.SshNet.Session)