Search code examples
c#.netc++-clitelnet

C++/CLI .Net telnet library


I am looking to make a Mud as a way of learning programming and enjoying it. Part of this is obviously working out a server client connection via the various clients muds use to connect. This uses Telnet for those who aren't aware. I was going to try to learn to do this myself but my father who is a professional programmer said its not that big of a deal to learn and using a library would allow me to move faster through it.

So my question is, first is using a library a better option here, and is there a good free one I can make use of that either uses C++/CLI .Net(preffered) or C# .Net(Was told this one is faster, but is less precise, so I would prefer to learn C++ for the precision, and I was told learning C++ is basically learning C# anyway)?

If using a library is not the best option, is there any good sites or books for finding a simple description on how to make one from scratch?


Solution

  • Most networking libraries will work with C and any variants thereupon.

    C# will allow you to implement something (relatively) quickly and easily, but insulate you from programming issues that arrise from using less "safe" languages.

    .Net is in fact a library, and it provides both C++ and C# interfaces.

    Using a library is deffinately the best option, as it would be required unless you want to get down to the hardware level in every respect. For example the function printf() comes from the C/POSIX library, it actually fills up a buffer on a character device, which then get pushed to a real terminal over a serial interface, or far more likely a virtual terminal and then to your drawing library. Wether you know it or not everytime you use an #import or #include you are linking against an interface to a library. In the case of these simple libraries the compiler already knows where they are so you don't have to tell it about them.

    In short C# will let you do things in an abstract and fluffy manner that may soften your learning in the begining, but will ultimatey prevent you from understanding what happened under the hood(and for many people that's ok). C++ will make your life more difficult, and it's compiler may give more cryptic errors, and it won't try to protect you from yourself, but you will probably learn a whole lot more. .Net is just the library your dad advises you use, as it provides a whole lot of functionality, without having a ton of dependencies.