From c24bb140ff60ec1fa0f6cdc676449f48c463a74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Tue, 7 Apr 2026 10:58:09 +0100 Subject: [PATCH] Remove unused code in Sockets --- nanoFramework.System.Net/Sockets/Socket.cs | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/nanoFramework.System.Net/Sockets/Socket.cs b/nanoFramework.System.Net/Sockets/Socket.cs index 3dd7969..5bfe49c 100644 --- a/nanoFramework.System.Net/Sockets/Socket.cs +++ b/nanoFramework.System.Net/Sockets/Socket.cs @@ -36,17 +36,6 @@ public class Socket : IDisposable [Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)] private SocketType _socketType = SocketType.Unknown; - // Our internal state doesn't automatically get updated after a non-blocking connect - // completes. Keep track of whether we're doing a non-blocking connect, and make sure - // to poll for the real state until we're done connecting. - [Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)] - private bool _nonBlockingConnectInProgress; - - // Keep track of the kind of endpoint used to do a non-blocking connect, so we can set - // it to m_RightEndPoint when we discover we're connected. - [Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)] - private EndPoint _nonBlockingConnectRightEndPoint; - // _rightEndPoint is null if the socket has not been bound. Otherwise, it is any EndPoint of the correct type (IPEndPoint, etc). [Diagnostics.DebuggerBrowsable(Diagnostics.DebuggerBrowsableState.Never)] internal EndPoint _rightEndPoint; @@ -344,18 +333,6 @@ public void Connect(EndPoint remoteEP) EndPoint endPointSnapshot = remoteEP; Snapshot(ref endPointSnapshot); - if (m_fBlocking) - { - // blocking connect - _nonBlockingConnectInProgress = false; - } - else - { - // non blocking connect - _nonBlockingConnectInProgress = true; - _nonBlockingConnectRightEndPoint = endPointSnapshot; - } - NativeSocket.connect(this, endPointSnapshot, !m_fBlocking); if (m_fBlocking)