# < Summary

Information

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

Line coverage
100%

Covered lines: | 9
Uncovered lines: | 0
Coverable lines: | 9
Total lines: | 23
Line coverage: | 100%

Branch coverage
N/A

Covered branches: | 0
Total branches: | 0
Branch coverage: | N/A

Method coverage

Feature is only available for sponsors

Upgrade to PRO version

# Metrics

Method | Branch coverage | Cyclomatic complexity | Line coverage
--- | --- | --- | ---
.ctor(...) | 100% | 1 | 100%
Connect(...) | 100% | 1 | 100%
ConnectAsync(...) | 100% | 1 | 100%

# File(s)

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

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System.Net.Sockets;`
|  | `2` |  | `using System.Threading;`
|  | `3` |  | ``
|  | `4` |  | `namespace Renci.SshNet.Connection`
|  | `5` |  | `{`
|  | `6` |  | `internal sealed class DirectConnector : ConnectorBase`
|  | `7` |  | `{`
|  | `8` |  | `public DirectConnector(ISocketFactory socketFactory)`
| 1865 | `9` |  | `: base(socketFactory)`
| 1865 | `10` |  | `{`
| 1865 | `11` |  | `}`
|  | `12` |  | ``
|  | `13` |  | `public override Socket Connect(IConnectionInfo connectionInfo)`
| 1857 | `14` |  | `{`
| 1857 | `15` |  | `return SocketConnect(connectionInfo.Host, connectionInfo.Port, connectionInfo.Timeout);`
| 1830 | `16` |  | `}`
|  | `17` |  | ``
|  | `18` |  | `public override System.Threading.Tasks.Task<Socket> ConnectAsync(IConnectionInfo connectionInfo, CancellationTok`
| 5 | `19` |  | `{`
| 5 | `20` |  | `return SocketConnectAsync(connectionInfo.Host, connectionInfo.Port, cancellationToken);`
| 5 | `21` |  | `}`
|  | `22` |  | `}`
|  | `23` |  | `}`

# Methods/Properties

.ctor(Renci.SshNet.Connection.ISocketFactory)
Connect(Renci.SshNet.IConnectionInfo)
ConnectAsync(Renci.SshNet.IConnectionInfo,System.Threading.CancellationToken)