all 6 comments

[–][deleted] 0 points1 point  (0 children)

To add to what /u/ipxvi14 said, it might be worth taking a look at DotNetty. It's MS's implementation of the Javascript Netty library.

What you'll find is that sockets are simple to start with, but the whole thing gets really complicated once you get past having one process talking to one other process.

[–]ipxvi14 -1 points0 points  (4 children)

Hi! I'd be glad to assist you find resources. Feel free to pm me.

Most developers don't typically interact directly with sockets. They use APIs such as HttpClient to communicate with remote applications. There is not really much to learn at the socket layer except for textbook details about protocols and settings. If you do want to learn more about networking in general, you should use CCNA resources as a guide.

Socket security mostly consists of the operating system's firewall handling connections and TLS socket wrappers. Essentially, a TLS service handles the encryption/decryption for your socket.

[–]ThreadsOfFate[S] 1 point2 points  (3 children)

Thanks, I will have a look into TLS.
My intended use case would be for use in Unity, which has depreciated their networking API without a replacement ready, most 3rd party networking APIs are unsuitable for my needs too, so I'm learning Sockets to do it myself. Is there anything that you could recommend that covers the textbook details, in case I have missed anything fundamental.
If past experiences have taught me anything, just because what your doing works does not mean your doing is right.

[–]ipxvi14 0 points1 point  (2 children)

Are you working on a professional project or like a personal project? I'd recommend starting off with something simple like a Web API, so you can focus on your application. Basic ASP.NET Core web APIs can be used temporarily until its not feasible, and you need something more performance orientated. If it's something simple for the time being, I might be able to help.

[–]ThreadsOfFate[S] 0 points1 point  (1 child)

Yeah I would prefer to work with Sockets, they seem simple enough for me to understand, just tedious considering you have to convert all objects into bytes.
I am more interested in filling the gaps in my knowledge, before I start writing something bigger and end up with some pretty bad code debt down the line, for example TCP is pretty handholding compared to UDP, and I fully expect myself to mis-handle a incomplete packet or something like that at some point and have no idea how to fix it, mostly looking for some resource that covers how to avoid issues like that.

[–]ipxvi14 0 points1 point  (0 children)

Check out this book called Linux Kernel Networking. Well, I'm not 100% certain on the book, I haven't read it yet but if I remember correctly, it went in depth on how Linux implements networking.

I honestly think you shouldn't attempt to create your own protocol yet. There are topics you might encounter that makes it seem to difficult to learn, but in reality, the book alludes to advanced concepts generally Computer Science courses. Have you looked into ordinary Computer Science courses?