I need to write a TCP client to communicate with a server. Looking at code samples (Socket, TcpClient?), I don't seem to be able to find anything which feels like a "modern" way to do approach this, given what I've seen elsewhere in my C# adventures.
I suppose specifically I was expecting to see Tasks and code like await socket.Connect(args)
, but instead I see callback-based async or BeginX methods...
What are my options, here? Do I just get on with it and work with something without TPL, or are there other approaches?
Many thanks!