L B Posted February 24, 2010 Share Posted February 24, 2010 Title says it all. I'm guessing UDP, with an initialization packet, but that doesn't seem too reliable. I'd work with TCP, but I get duplicated data in C#, since the only according SocketType is Stream, which duplicates data. Ideas? Quote Link to comment Share on other sites More sharing options...
L B Posted February 24, 2010 Author Share Posted February 24, 2010 Kept thinking, UDP is definitely the way to go. However, I'm used to a Multithreaded TCP Server approach, with each thread a socket. My question is: Do I actually only need 1 UDP socket for all my connections? If so, I must provide some kind of identification system in my sent packets. This seems very troublesome. I would love to use TCP, but I get some kind of annoying duplication in C#. I'm not even sure if this is normal or not, but I do know I used to work with the same C# server architecture with a client that I didn't make that used TCP, and there was no duplication. Quote Link to comment Share on other sites More sharing options...
Rick Posted February 24, 2010 Share Posted February 24, 2010 Use reliable connected UDP (it's a layer over UDP that makes it reliable and handles keeping it connected for you and still faster than TCP). RakNet has this already built in and I've used it and love it. Quote Link to comment Share on other sites More sharing options...
Josh Posted February 25, 2010 Share Posted February 25, 2010 Enet has a "reliable" flag for packets. It's not 100% reliable, but it seems to work pretty well. If a packet is missed, the program just resends it. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
L B Posted February 25, 2010 Author Share Posted February 25, 2010 I'll use TCP actually. My game is not a shooter, so it's not fast paced enough to justify UDP. Thanks for the advices. Quote Link to comment Share on other sites More sharing options...
Ending Credits Posted February 25, 2010 Share Posted February 25, 2010 Since we have this thread already, when is the networking documentation going to get updated? There's no information at all on the TEvent type. Quote AMD Phenom 9850 (X4 2.5GHz) | 1066MHz CL5 GEIL Black Dragon (800MHz) | Powercolor ATI 4870 1GB | DFI 790FXB-M2RSH | 24" 1920x1200 | Windows Vista 64-bit Ultimate Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.