C
C#5mo ago
unenergizer

C# Networking

Hi, switching to C# for an upcoming project. 13 year Java programmer. In Java I would write networking apps using the Netty framework. What is the preferred way to do the same thing in C#? I’ve found DotNetty but that project looks dead. Thanks guys!
8 Replies
Jimmacle
Jimmacle5mo ago
what exactly do you mean by networking? looking at the netty website it looks like most of that functionality is in the standard .NET libraries and the rest can be found on nuget
Becquerel
Becquerel5mo ago
for standard HTTP work you will be using HttpClient or something built on top of it 99% of the time
unenergizer
unenergizerOP5mo ago
I need TCP and UDP support. Netty for Java is an asynchronous solution vs plain Java sockets. Wondering what developers recommend for C#. I’m very green with C# and I’m trying to sort through the noise and get direct input from real people.
Angius
Angius5mo ago
Seems like System.Net.Sockets is the namespace that has stuff like that
System.Net.Sockets Namespace
Provides a managed implementation of the Windows Sockets (Winsock) interface for developers who need to tightly control access to the network.
Angius
Angius5mo ago
TCP Client, TCP Listener, UDP Client, and so on
Jimmacle
Jimmacle5mo ago
yeah, there are specific classes but they're all just thin wrappers around a Socket which can already be used asynchronously in C#
jcotton42
jcotton425mo ago
Seems that Netty handles a lot of the grunt work.
unenergizer
unenergizerOP4mo ago
Netty does do a lot of the grunt work. It's used by many big companies (google, facebook, etc) and has a lot of nice features. Companies: https://netty.io/wiki/adopters.html Overview: https://netty.io/index.html I can write what I need from scratch, but their is no need to reinvent the wheel if a project like Netty already exists. Thanks guys for your input!
Want results from more Discord servers?
Add your server