Hack Forums
[C#] [Release] C# Networking Library! - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] [Release] C# Networking Library! (/showthread.php?tid=6102162)



[Release] C# Networking Library! - SIM-4100260 - Aug 12, 2020

Hi all!
So, to overcome my fear of networking, i have decided to write a networking library.
I searched on the net for inspiration, and i found Gigajew's little socket library. My library's logic is heavily inspired from that, the events have the same names, but it is written from scratch.
His library had multiple flaws, such as:
  • Bad exception handling.
  • Some misc. flaws in the code.
  • But the worst of all, the library's network logic was flawed. (you would not receive all your data, in a real situation. I redid all that logic. I made a test with his original library, with a simple screen share app, and the image would get cut off and corrupted. My library guarantees that your whole data is received and reconstructed properly. (well, it can only transfer 2.147 GB on one packet, but it can be easily adjusted to transfer 9.223 exabytes(9.223 × 10^9 GB) / packet, if you're into that.
My code follows Gigajew's code closely.

I really need some help from more experienced networking coders. For example, the exception handling that i did is not very good (i suspect). Also, the server is extremely open to attacks. Any other packet than the one generated by a Socket_Client will crash it. I tought of doing some kind of handshake with password, but i don't know if it's the best thing(also, in this case, if somebody obtained the password, an attacker could make a packet that fills the memory by changing the header.)
Code on github


RE: [Release] C# Networking Library! - SIM-4108685 - Jan 23, 2021

hi, i cannot access your github repo


RE: [Release] C# Networking Library! - gigajew - Jan 26, 2021

Not sure which code of mine you used but I'm sure you can find a lot better ones out there. Glad if it helped you at all though.