• About
  • Privacy Policy
  • Utilities
Darchuk.NET

TCP

C# Setting Socket Keep-Alive

January 4, 2019 by Robert 4 Comments

TCP is a good choice for communication if you want to know that your message got to where it was going, as opposed to UDP where the communication is fire-and-forget. When a message is sent, the recipient sends an acknowledgement that the message arrived successfully.  If you don’t get an acknowledgement, you have a pretty … [Read more…]

Posted in: C# Tagged: C#, KeepAlive, Networking, Socket, TCP, TcpClient

Capturing and Analyzing localhost to localhost traffic on Windows

March 30, 2018 by Robert Leave a Comment

Recently I had an issue where I was trying to create a stubbed/mocked version of a SOAP service locally.  I ran my web application, my client connected, my service got the request, sent back the response and… the client didn’t like it.  Not sure why… everything should be working.  So I wanted to look at … [Read more…]

Posted in: .NET Core, C#, Web Development Tagged: .NET, C#, capture, localhost, Packet, SOAP, TCP, Wireshark

Mocking TcpClient

January 19, 2018 by Robert Leave a Comment

Sometimes I want to unit test the pieces of my code that are close to the transport layer, but often they are so close to the metal that it is hard to separate them. There’s really not a great way to abstract out the communication layer, so you just have to bite the bullet and … [Read more…]

Posted in: C#, Unit Testing Tagged: C#, Mock, TCP, TcpClient, unit testing

Recent Posts

  • Allowing trailing JSON commas in ASP.NET Core 3
  • YADNC3JSG–Yet Another .NET Core 3.0 JSON Serializer Gotcha
  • Logging in a .NET Core 3 SignalR client
  • .NET Core 3 unit testing project sdk
  • .NET Core 3.0 Upgrade–New JSON Serializer Gotchas

Recent Comments

  1. Robert on C# Setting Socket Keep-Alive
  2. Oliver Schramm on C# Setting Socket Keep-Alive
  3. John Anderson on Waiting for a keypress asynchronously in a C# console app
  4. Ronald Garlit on .NET Core 3 unit testing project sdk
  5. Ronald Garlit on .NET Core 3 unit testing project sdk

Copyright © 2025 Darchuk.NET.

Omega WordPress Theme by ThemeHall