From b17ea12056bc06954cea8d15210e55b6cf0f6015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Tue, 7 Apr 2026 11:22:34 +0100 Subject: [PATCH] Add `Connect` to `Socket` - Bump native assembly version. --- nanoFramework.System.Net/Properties/AssemblyInfo.cs | 2 +- nanoFramework.System.Net/Sockets/Socket.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nanoFramework.System.Net/Properties/AssemblyInfo.cs b/nanoFramework.System.Net/Properties/AssemblyInfo.cs index 4b80865..f0a0e86 100644 --- a/nanoFramework.System.Net/Properties/AssemblyInfo.cs +++ b/nanoFramework.System.Net/Properties/AssemblyInfo.cs @@ -16,7 +16,7 @@ //////////////////////////////////////////////////////////////// // update this whenever the native assembly signature changes // -[assembly: AssemblyNativeVersion("100.2.0.11")] +[assembly: AssemblyNativeVersion("100.2.0.12")] //////////////////////////////////////////////////////////////// // Setting ComVisible to false makes the types in this assembly not visible diff --git a/nanoFramework.System.Net/Sockets/Socket.cs b/nanoFramework.System.Net/Sockets/Socket.cs index 5bfe49c..e87e77f 100644 --- a/nanoFramework.System.Net/Sockets/Socket.cs +++ b/nanoFramework.System.Net/Sockets/Socket.cs @@ -180,6 +180,14 @@ public EndPoint RemoteEndPoint } } + /// + /// Gets a value that indicates whether a is connected to a remote host as of the last or operation. + /// + /// + /// if the was connected to a remote resource as of the most recent operation; otherwise, . + /// + public bool Connected => _rightEndPoint != null && m_Handle != -1; + /// /// Gets or sets a value that specifies the amount of time after which a synchronous call will time out. ///