Skip to content

Commit 5ac26e5

Browse files
authored
Add Connect to Socket (#374)
1 parent 719b49d commit 5ac26e5

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

nanoFramework.System.Net/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
////////////////////////////////////////////////////////////////
1818
// update this whenever the native assembly signature changes //
19-
[assembly: AssemblyNativeVersion("100.2.0.11")]
19+
[assembly: AssemblyNativeVersion("100.2.0.12")]
2020
////////////////////////////////////////////////////////////////
2121

2222
// Setting ComVisible to false makes the types in this assembly not visible

nanoFramework.System.Net/Sockets/Socket.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,14 @@ public EndPoint RemoteEndPoint
180180
}
181181
}
182182

183+
/// <summary>
184+
/// Gets a value that indicates whether a <see cref="Socket"/> is connected to a remote host as of the last <see cref="Send"/> or <see cref="Receive"/> operation.
185+
/// </summary>
186+
/// <value>
187+
/// <see langword="true"/> if the <see cref="Socket"/> was connected to a remote resource as of the most recent operation; otherwise, <see langword="false"/>.
188+
/// </value>
189+
public bool Connected => _rightEndPoint != null && m_Handle != -1;
190+
183191
/// <summary>
184192
/// Gets or sets a value that specifies the amount of time after which a synchronous <see cref="Receive(Byte[])"/> call will time out.
185193
/// </summary>

0 commit comments

Comments
 (0)