3
\$\begingroup\$

I am trying to learn Raknet with C# and I found it extremely confusing.

The Raknet tutorial seems to work well in C++. I have already made the chat server from the tutorial.

I am looking to do something similar in C# but I'm having trouble.

So my main question is what is the best way to use Raknet from C#?

The following information would also be very helpful:

  • A good tutorial for Raknet and C# together
  • Sample C# code for Raknet

I've done a lot of research but I'm still stuck.

Maybe Raknet isn't what I need after all? Comments with more C#-centric alternatives would also be appreciated.

\$\endgroup\$
  • 2
    \$\begingroup\$ From the Wikipedia article: "RakNet is a C++ class library that provides TCP and reliable UDP transport." It's for C++, so you might well be on your own as far as .Net's managed C++ and C# go. If you're having this much difficulty, aren't there other TCP and UDP protocols you can use instead? \$\endgroup\$ – doppelgreener Jun 6 '12 at 23:56
  • \$\begingroup\$ I was wondering about that in my PD. My supervisor adviced me to use raknet in C# but everything I read made me think maybe is not the best option... \$\endgroup\$ – Oscar Foley Jun 7 '12 at 6:17
  • 1
    \$\begingroup\$ Why not take a look at SuperSocket? It's written purely in C# and although I haven't used it personally (yet), I've heard just so many recommendations of it. \$\endgroup\$ – Dunya Degirmenci Jun 7 '12 at 19:26
  • \$\begingroup\$ Thanks. I will take a look at SuperSocket :) BTW I am wondering now who downvoted my question.. did I made something wrong? \$\endgroup\$ – Oscar Foley Jun 7 '12 at 21:05
  • 2
    \$\begingroup\$ Downvote plus 4 votes to close, but no comments explaining why? \$\endgroup\$ – Tim Holt Jun 13 '12 at 16:02
7
\$\begingroup\$

Everything you need can, more or less, be found on the official site,

  • raknet.com/raknet/manual/

There, they also have an official tutorial for using RakNet in C#, which is based on SWIG (just like raknetdotnet):

  • jenkinssoftware.com/raknet/manual/swigtutorial.html

You may be interested in lidgren, which is written in C#:

A basic but complete tutorial for starters can be found here:

Good luck!

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ +1 for mentioning Lidgren. It's a great networking engine. \$\endgroup\$ – jmegaffin Jun 13 '12 at 16:31
  • \$\begingroup\$ Thanks. I have been googling a lot and I think I suffer overinformation. So many info about C++ hides good resources in C#. I will make a depth read on this links. I have already read about swig and found it a little bit confusing. \$\endgroup\$ – Oscar Foley Jun 13 '12 at 16:42
  • 1
    \$\begingroup\$ +1 I am testing Lidgren right now and seems very cool. Thanks! \$\endgroup\$ – Oscar Foley Jul 14 '12 at 18:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.