Skip to content

feat(csharp): add TCP/TLS producer and consumer examples#2821

Open
atharvalade wants to merge 2 commits intoapache:masterfrom
atharvalade:csharp-tcp-tls-examples
Open

feat(csharp): add TCP/TLS producer and consumer examples#2821
atharvalade wants to merge 2 commits intoapache:masterfrom
atharvalade:csharp-tcp-tls-examples

Conversation

@atharvalade
Copy link
Contributor

Which issue does this PR close?

Closes #2806

Rationale

The C# SDK had comprehensive TLS integration tests but no TLS examples in examples/csharp/ for users to reference.

What changed?

Users had to read the integration test source to understand TLS configuration despite the SDK having full TLS support via TlsSettings.

Added TcpTls example projects with producer and consumer demonstrating IggyClientConfigurator with TlsSettings (Enabled, Hostname, CertificatePath) pointing to core/certs/iggy_ca_cert.pem. Registered new projects in Iggy_SDK.Examples.sln under a TcpTls solution folder.

Local Execution

Passed. dotnet build Iggy_SDK.Examples.sln succeeds with 0 warnings, 0 errors.

AI Usage

  1. Opus 4.6
  2. guided by existing GettingStarted examples and IggyTlsConnectionTests.cs TLS config patterns
  3. Compiled and built locally, verified code follows existing patterns exactly
  4. Yes

@atharvalade
Copy link
Contributor Author

atharvalade commented Feb 26, 2026

Resolved

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.43%. Comparing base (514b5c5) to head (096ce74).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2821      +/-   ##
============================================
- Coverage     71.44%   71.43%   -0.02%     
  Complexity      708      708              
============================================
  Files           969      969              
  Lines         78219    78219              
  Branches      60029    60039      +10     
============================================
- Hits          55884    55874      -10     
  Misses        20002    20002              
- Partials       2333     2343      +10     
Flag Coverage Δ
csharp 67.06% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Configure IggyClientConfigurator with TlsSettings using custom CA certs
@atharvalade atharvalade force-pushed the csharp-tcp-tls-examples branch from d33f1d0 to 3bb3a69 Compare February 26, 2026 17:37
@atharvalade atharvalade changed the title Add TCP/TLS producer and consumer examples for C# SDK feat(csharp): add TCP/TLS producer and consumer examples Feb 26, 2026
Copy link
Member

@mmodzelewski mmodzelewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atharvalade same as with Java PR, the examples should be included in the README.

@lukaszzborek please have a look when you can.

Copy link
Contributor

@lukaszzborek lukaszzborek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, but 2 points

  1. add this example into README file in examples/csharp directory to be run by CI
  2. iggy server used by this example not use tls in configuration. Propably we need to run second instance in script with different configuration with tls (need to be check)
    @hubcio

@hubcio
Copy link
Contributor

hubcio commented Feb 27, 2026

@lukaszzborek this will not be that simple because we'd have to restart server - there is either normal unencrypted TCP or TLS TCP. I'd say that we create separate instance for server for TLS tests. @atharvalade can you figure it out? see scripts/run-csharp-examples-from-readme.sh

@atharvalade
Copy link
Contributor Author

@lukaszzborek this will not be that simple because we'd have to restart server - there is either normal unencrypted TCP or TLS TCP. I'd say that we create separate instance for server for TLS tests. @atharvalade can you figure it out? see scripts/run-csharp-examples-from-readme.sh

give me some time, I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C# SDK: Add TCP/TLS examples

4 participants