diff --git a/.pubnub.yml b/.pubnub.yml index 4f25ee65e..51086c1b7 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,8 +1,13 @@ name: c-sharp -version: "7.3.8" +version: "7.3.9" schema: 1 scm: github.com/pubnub/c-sharp changelog: + - date: 2025-05-09 + version: v7.3.9 + changes: + - type: improvement + text: "Changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling." - date: 2025-04-08 version: v7.3.8 changes: @@ -887,7 +892,7 @@ features: - QUERY-PARAM supported-platforms: - - version: Pubnub 'C#' 7.3.8 + version: Pubnub 'C#' 7.3.9 platforms: - Windows 10 and up - Windows Server 2008 and up @@ -898,7 +903,7 @@ supported-platforms: - .Net Framework 4.6.1+ - .Net Framework 6.0 - - version: PubnubPCL 'C#' 7.3.8 + version: PubnubPCL 'C#' 7.3.9 platforms: - Xamarin.Android - Xamarin.iOS @@ -918,7 +923,7 @@ supported-platforms: - .Net Core - .Net 6.0 - - version: PubnubUWP 'C#' 7.3.8 + version: PubnubUWP 'C#' 7.3.9 platforms: - Windows Phone 10 - Universal Windows Apps @@ -942,7 +947,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: Pubnub - location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.8.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.9.0 requires: - name: ".Net" @@ -1225,7 +1230,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubNubPCL - location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.8.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.9.0 requires: - name: ".Net Core" @@ -1584,7 +1589,7 @@ sdks: distribution-type: source distribution-repository: GitHub package-name: PubnubUWP - location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.8.0 + location: https://github.com/pubnub/c-sharp/releases/tag/v7.3.9.0 requires: - name: "Universal Windows Platform Development" diff --git a/CHANGELOG b/CHANGELOG index e740982e4..22f8c0604 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +v7.3.9 - May 09 2025 +----------------------------- +- Modified: changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling. + v7.3.8 - April 08 2025 ----------------------------- - Modified: subscribe with custom timetoken scenario handling improvements. diff --git a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager2.cs b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager2.cs index 4d0366028..a568b35d7 100644 --- a/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager2.cs +++ b/src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager2.cs @@ -120,7 +120,7 @@ internal async Task, PNStatus>> ReceiveRequest x).ToArray())} \n cg(s)={string.Join(",", channelGroups.OrderBy(x => x).ToArray())} \n Exception Details={ex}"); + $" Receiving effect exception for \n channel(s)={string.Join(",", channels.OrderBy(x => x).ToArray())} \n cg(s)={string.Join(",", channelGroups.OrderBy(x => x).ToArray())} \n Exception Details={ex} \n Stack trace={ex.StackTrace}"); } return resp; } diff --git a/src/Api/PubnubApi/PNConfiguration.cs b/src/Api/PubnubApi/PNConfiguration.cs index f9b494ae9..45044d967 100644 --- a/src/Api/PubnubApi/PNConfiguration.cs +++ b/src/Api/PubnubApi/PNConfiguration.cs @@ -93,7 +93,7 @@ public CryptoModule CryptoModule } } - public PubnubLogModule Logger { get; set; } + public PubnubLogModule Logger { get; internal set; } public string AuthKey { diff --git a/src/Api/PubnubApi/Properties/AssemblyInfo.cs b/src/Api/PubnubApi/Properties/AssemblyInfo.cs index 94c34f1b8..f51f14e50 100644 --- a/src/Api/PubnubApi/Properties/AssemblyInfo.cs +++ b/src/Api/PubnubApi/Properties/AssemblyInfo.cs @@ -11,8 +11,8 @@ [assembly: AssemblyProduct("Pubnub C# SDK")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] -[assembly: AssemblyVersion("7.3.8.0")] -[assembly: AssemblyFileVersion("7.3.8.0")] +[assembly: AssemblyVersion("7.3.9.0")] +[assembly: AssemblyFileVersion("7.3.9.0")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. diff --git a/src/Api/PubnubApi/Pubnub.cs b/src/Api/PubnubApi/Pubnub.cs index 736889e4c..f860f2bec 100644 --- a/src/Api/PubnubApi/Pubnub.cs +++ b/src/Api/PubnubApi/Pubnub.cs @@ -1227,7 +1227,8 @@ public Pubnub(PNConfiguration config, IHttpClientService httpTransportService = //Defaulting to DotNet PNSDK source if no custom one is specified Version = (ipnsdkSource == default) ? new DotNetPNSDKSource().GetPNSDK() : ipnsdkSource.GetPNSDK(); IHttpClientService httpClientService = - httpTransportService ?? new HttpClientService(proxy: config.Proxy, configuration: config); + httpTransportService ?? new HttpClientService(proxy: config.Proxy); + httpClientService.SetLogger(logger); transportMiddleware = middleware ?? new Middleware(httpClientService, config, this, tokenManager); logger?.Debug(GetConfigurationLogString(config)); } diff --git a/src/Api/PubnubApi/PubnubApi.csproj b/src/Api/PubnubApi/PubnubApi.csproj index 09fd263eb..290a8fb24 100644 --- a/src/Api/PubnubApi/PubnubApi.csproj +++ b/src/Api/PubnubApi/PubnubApi.csproj @@ -14,7 +14,7 @@ Pubnub - 7.3.8.0 + 7.3.9.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -22,7 +22,7 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - Subscribe with custom timetoken scenario handling improvements. + Changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling. Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously diff --git a/src/Api/PubnubApi/Transport/HttpClientService.cs b/src/Api/PubnubApi/Transport/HttpClientService.cs index e51a255b8..f123a840b 100644 --- a/src/Api/PubnubApi/Transport/HttpClientService.cs +++ b/src/Api/PubnubApi/Transport/HttpClientService.cs @@ -11,23 +11,26 @@ namespace PubnubApi public class HttpClientService : IHttpClientService { private readonly HttpClient httpClient; - private readonly PubnubLogModule logger; + private PubnubLogModule logger; - public HttpClientService(IWebProxy proxy, PNConfiguration configuration) + public HttpClientService(IWebProxy proxy) { - logger = configuration.Logger; - - var handler = new HttpClientHandler - { - MaxConnectionsPerServer = 50, - UseProxy = proxy != null, - Proxy = proxy - }; - - httpClient = new HttpClient(handler) + httpClient = new HttpClient() { Timeout = Timeout.InfiniteTimeSpan }; + if (proxy == null) return; + httpClient = new HttpClient(new HttpClientHandler() + { + Proxy = proxy, + UseProxy = true + }); + httpClient.Timeout = Timeout.InfiniteTimeSpan; + } + + public void SetLogger(PubnubLogModule logger) + { + this.logger = logger; } public async Task GetRequest(TransportRequest transportRequest) diff --git a/src/Api/PubnubApi/TransportContract/IHttpClientService.cs b/src/Api/PubnubApi/TransportContract/IHttpClientService.cs index a86a2c01e..8c1b415e4 100644 --- a/src/Api/PubnubApi/TransportContract/IHttpClientService.cs +++ b/src/Api/PubnubApi/TransportContract/IHttpClientService.cs @@ -9,5 +9,6 @@ public interface IHttpClientService Task PostRequest(TransportRequest transportRequest); Task PatchRequest(TransportRequest transportRequest); Task PutRequest(TransportRequest transportRequest); + void SetLogger(PubnubLogModule logger); } } \ No newline at end of file diff --git a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj index 194c5985d..2c393afe2 100644 --- a/src/Api/PubnubApiPCL/PubnubApiPCL.csproj +++ b/src/Api/PubnubApiPCL/PubnubApiPCL.csproj @@ -14,7 +14,7 @@ PubnubPCL - 7.3.8.0 + 7.3.9.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -22,7 +22,7 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - Subscribe with custom timetoken scenario handling improvements. + Changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling. Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously diff --git a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj index 7d6153e95..175510af0 100644 --- a/src/Api/PubnubApiUWP/PubnubApiUWP.csproj +++ b/src/Api/PubnubApiUWP/PubnubApiUWP.csproj @@ -16,7 +16,7 @@ PubnubUWP - 7.3.8.0 + 7.3.9.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -24,7 +24,7 @@ http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png true https://github.com/pubnub/c-sharp/ - Subscribe with custom timetoken scenario handling improvements. + Changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling. Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing PubNub is a Massively Scalable Web Push Service for Web and Mobile Games. This is a cloud-based service for broadcasting messages to thousands of web and mobile clients simultaneously diff --git a/src/Api/PubnubApiUnity/PubnubApiUnity.csproj b/src/Api/PubnubApiUnity/PubnubApiUnity.csproj index 4ee23836d..d0dc9b825 100644 --- a/src/Api/PubnubApiUnity/PubnubApiUnity.csproj +++ b/src/Api/PubnubApiUnity/PubnubApiUnity.csproj @@ -2,6 +2,7 @@ net6.0;netstandard2.0 + true default True pubnub.snk @@ -14,7 +15,7 @@ PubnubApiUnity - 7.3.8.0 + 7.3.9.0 PubNub C# .NET - Web Data Push API Pandu Masabathula PubNub @@ -671,178 +672,6 @@ - - - - None - - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - - - - - None - - - None - - - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - - None - - @@ -886,6 +715,11 @@ + + + + +