Skip to content

Commit a8343f4

Browse files
committed
expose LocalEndPoint
1 parent f91548c commit a8343f4

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/SuperSocket.Client/EasyClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public abstract class EasyClient : IEasyClient
4343
/// <summary>
4444
/// Gets or sets the local endpoint for the client.
4545
/// </summary>
46-
public IPEndPoint LocalEndPoint { get; set; }
46+
public EndPoint LocalEndPoint { get; set; }
4747

4848
/// <summary>
4949
/// Gets or sets the security options for the client.
@@ -195,6 +195,7 @@ protected virtual async ValueTask<bool> ConnectAsync(EndPoint remoteEndPoint, Ca
195195
throw new Exception("Socket is null.");
196196

197197
SetupConnection(state.CreateConnection(Options));
198+
LocalEndPoint = socket.LocalEndPoint;
198199
return true;
199200
}
200201

src/SuperSocket.Client/IEasyClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public interface IEasyClient : IDisposable, IAsyncDisposable
2828
/// <summary>
2929
/// Gets or sets the local endpoint for the client.
3030
/// </summary>
31-
IPEndPoint LocalEndPoint { get; set; }
31+
EndPoint LocalEndPoint { get; set; }
3232

3333
/// <summary>
3434
/// Gets or sets the security options for the client.

src/SuperSocket.Client/SocketConnector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class SocketConnector : ConnectorBase
1414
/// <summary>
1515
/// Gets the local endpoint to bind the socket to.
1616
/// </summary>
17-
public IPEndPoint LocalEndPoint { get; private set; }
17+
public EndPoint LocalEndPoint { get; private set; }
1818

1919
/// <summary>
2020
/// Gets or sets a value indicating whether the Nagle algorithm is disabled for the socket.
@@ -36,7 +36,7 @@ public SocketConnector()
3636
/// Initializes a new instance of the <see cref="SocketConnector"/> class with the specified local endpoint.
3737
/// </summary>
3838
/// <param name="localEndPoint">The local endpoint to bind the socket to.</param>
39-
public SocketConnector(IPEndPoint localEndPoint)
39+
public SocketConnector(EndPoint localEndPoint)
4040
: base()
4141
{
4242
LocalEndPoint = localEndPoint;

0 commit comments

Comments
 (0)