Skip to content

Commit 700cd7e

Browse files
authored
Add remote end point field to Socket (#73)
1 parent 731d64d commit 700cd7e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

source/nanoFramework.System.Net/Properties/AssemblyInfo.cs

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

1313
////////////////////////////////////////////////////////////////
1414
// update this whenever the native assembly signature changes //
15-
[assembly: AssemblyNativeVersion("1.0.6.0")]
15+
[assembly: AssemblyNativeVersion("1.0.7.0")]
1616
////////////////////////////////////////////////////////////////
1717

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

source/nanoFramework.System.Net/Sockets/Socket.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class Socket : IDisposable
2424

2525
private bool m_fBlocking = true;
2626
private EndPoint m_localEndPoint = null;
27+
private EndPoint _remoteEndPoint = null;
2728

2829
// timeout values are stored in uSecs since the Poll method requires it.
2930
private int m_recvTimeout = System.Threading.Timeout.Infinite;
@@ -313,6 +314,9 @@ public void Connect(EndPoint remoteEP)
313314
throw new ObjectDisposedException();
314315
}
315316

317+
// store remote endpoint we are connecting to
318+
_remoteEndPoint = remoteEP;
319+
316320
NativeSocket.connect(this, remoteEP.Serialize().m_Buffer, !m_fBlocking);
317321

318322
if (m_fBlocking)

0 commit comments

Comments
 (0)