Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/Api/PubnubApi/EndPoint/PubSub/SubscribeManager2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ internal async Task<Tuple<ReceivingResponse<object>, PNStatus>> ReceiveRequest<T
} catch (Exception ex)
{
logger?.Error(
$" 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}");
$" 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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Api/PubnubApi/PNConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public CryptoModule CryptoModule
}
}

public PubnubLogModule Logger { get; set; }
public PubnubLogModule Logger { get; internal set; }

public string AuthKey
{
Expand Down
4 changes: 2 additions & 2 deletions src/Api/PubnubApi/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion src/Api/PubnubApi/Pubnub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
4 changes: 2 additions & 2 deletions src/Api/PubnubApi/PubnubApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

<PropertyGroup>
<PackageId>Pubnub</PackageId>
<PackageVersion>7.3.8.0</PackageVersion>
<PackageVersion>7.3.9.0</PackageVersion>
<Title>PubNub C# .NET - Web Data Push API</Title>
<Authors>Pandu Masabathula</Authors>
<Owners>PubNub</Owners>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
<PackageReleaseNotes>Subscribe with custom timetoken scenario handling improvements.</PackageReleaseNotes>
<PackageReleaseNotes>Changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling.</PackageReleaseNotes>
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
<!--<Summary>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</Summary>-->
<Description>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</Description>
Expand Down
27 changes: 15 additions & 12 deletions src/Api/PubnubApi/Transport/HttpClientService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<TransportResponse> GetRequest(TransportRequest transportRequest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ public interface IHttpClientService
Task<TransportResponse> PostRequest(TransportRequest transportRequest);
Task<TransportResponse> PatchRequest(TransportRequest transportRequest);
Task<TransportResponse> PutRequest(TransportRequest transportRequest);
void SetLogger(PubnubLogModule logger);
}
}
4 changes: 2 additions & 2 deletions src/Api/PubnubApiPCL/PubnubApiPCL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@

<PropertyGroup>
<PackageId>PubnubPCL</PackageId>
<PackageVersion>7.3.8.0</PackageVersion>
<PackageVersion>7.3.9.0</PackageVersion>
<Title>PubNub C# .NET - Web Data Push API</Title>
<Authors>Pandu Masabathula</Authors>
<Owners>PubNub</Owners>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
<PackageReleaseNotes>Subscribe with custom timetoken scenario handling improvements.</PackageReleaseNotes>
<PackageReleaseNotes>Changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling.</PackageReleaseNotes>
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
<!--<Summary>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</Summary>-->
<Description>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</Description>
Expand Down
4 changes: 2 additions & 2 deletions src/Api/PubnubApiUWP/PubnubApiUWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

<PropertyGroup>
<PackageId>PubnubUWP</PackageId>
<PackageVersion>7.3.8.0</PackageVersion>
<PackageVersion>7.3.9.0</PackageVersion>
<Title>PubNub C# .NET - Web Data Push API</Title>
<Authors>Pandu Masabathula</Authors>
<Owners>PubNub</Owners>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIconUrl>http://pubnub.s3.amazonaws.com/2011/powered-by-pubnub/pubnub-icon-600x600.png</PackageIconUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryUrl>https://github.com/pubnub/c-sharp/</RepositoryUrl>
<PackageReleaseNotes>Subscribe with custom timetoken scenario handling improvements.</PackageReleaseNotes>
<PackageReleaseNotes>Changed the way the PubNub logger is injected into IHtttpClientService for better custom-transport-layers handling.</PackageReleaseNotes>
<PackageTags>Web Data Push Real-time Notifications ESB Message Broadcasting Distributed Computing</PackageTags>
<!--<Summary>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</Summary>-->
<Description>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</Description>
Expand Down
Loading
Loading