Jump to content
  • Advertisement
Sign in to follow this  
evanofsky

[.net] Large Network Packets

This topic is 4256 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to send a large packet (>10kb) over a LAN connection, and the simple Socket.SendTo() Socket.Receive() system I'm using can't handle it. Actually, it craps out a lot sooner than that (<2kb). Is there some easy way of doing this in .NET, without splitting the data into smaller packets?

Share this post


Link to post
Share on other sites
Advertisement
Using UDP? I think there is a limit on packet size that's in the network system not .Net. It might be better to open a TCP connection for downloading large files; I think you're going to have to split and reassemble if you want to use UDP.

This might be better off in Multiplayer and Networking?

Share this post


Link to post
Share on other sites
The maximum size of a UDP packet (including framing overhead) is 64 kilobytes. However, the MTU of underlying transport will typically be smaller (in the range of 1500 bytes for Ethernet), so sending larger packets will generate IP fragmentation and re-assembly on the other end. This should all be transparently handled by the network stack, though -- when you say it doesn't work, what is the actual problem you're seeing? Are you setting some "do not fragment" flag, and getting an error, perhaps?

Also, with fragmented IP packets, your packet will have a larger chance of getting dropped, because if any one fragment is dropped, the entire packet will be lost.

Share this post


Link to post
Share on other sites
By "not working", I mean the network packet gets dropped completely. AFAIK, I'm not setting any "do not fragment" flags. I don't know much about TCP, which is why I went with UDP first, but I'll probably end up using TCP anyway.

Hadn't thought about the Multiplayer/Networking forum. [imwithstupid]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!