@@ -13,15 +13,14 @@ namespace BootstrapBlazor.Components;
1313public interface ITcpSocketFactory : IDisposable
1414{
1515 /// <summary>
16- /// Retrieves an existing TCP socket client by name or creates a new one if it does not exist .
16+ /// Retrieves an existing TCP socket client by name or creates a new one using the specified factory function .
1717 /// </summary>
18- /// <param name="name">The unique name used to identify the TCP socket client. Cannot be null or empty.</param>
19- /// <param name="endPoint">The network endpoint to associate with the TCP socket client. Must be a valid <see
20- /// cref="System.Net.IPEndPoint"/> instance.</param>
21- /// <returns>An instance of <see cref="ITcpSocketClient"/> representing the TCP socket client associated with the specified
22- /// name and endpoint. If a client with the given name already exists, the existing instance is returned; otherwise,
23- /// a new client is created.</returns>
24- ITcpSocketClient GetOrCreate ( string name , IPEndPoint endPoint ) ;
18+ /// <param name="name">The unique name identifying the TCP socket client. Cannot be null or empty.</param>
19+ /// <param name="valueFactory">A factory function that generates an <see cref="IPEndPoint"/> for the client. The function is invoked if a
20+ /// client with the specified name does not already exist.</param>
21+ /// <returns>An instance of <see cref="ITcpSocketClient"/> associated with the specified name. If a client with the given
22+ /// name already exists, the existing instance is returned; otherwise, a new instance is created.</returns>
23+ ITcpSocketClient GetOrCreate ( string name , Func < string , IPEndPoint > valueFactory ) ;
2524
2625 /// <summary>
2726 /// Removes the TCP socket client associated with the specified name.
0 commit comments