Networking Forums

Networking Forums > Computer Networking > Linux Networking > Network Programming (misc question)

Reply
Thread Tools Display Modes

Network Programming (misc question)

 
 
xm
Guest
Posts: n/a

 
      02-19-2005, 07:32 PM
Hi there,
I'm about to develop a few programs (or rather a few functions of
one program) in order to understand and practice network programming.

The application will be focused on file transfer (aiming for
transfer stability and speed) and I also intend to work on a action
game network programming, so I will probably deal with ultra quick
information transfer, etc... but my first concerns are for transfer
speed and stability.

My question is this.

I will play with both UDP and TCP, I would like to know what size
should my packets be to make sure they don't get fragmented, etc...
what is the best packet size in other words?

Thanks,
xm
 
Reply With Quote
 
 
 
 
David Efflandt
Guest
Posts: n/a

 
      02-20-2005, 07:45 AM
On 19 Feb 2005 12:32:04 -0800, xm <(E-Mail Removed)> wrote:
> Hi there,
> I'm about to develop a few programs (or rather a few functions of
> one program) in order to understand and practice network programming.
>
> The application will be focused on file transfer (aiming for
> transfer stability and speed) and I also intend to work on a action
> game network programming, so I will probably deal with ultra quick
> information transfer, etc... but my first concerns are for transfer
> speed and stability.
>
> My question is this.
>
> I will play with both UDP and TCP, I would like to know what size
> should my packets be to make sure they don't get fragmented, etc...
> what is the best packet size in other words?


The best packet size, including any headers, is the mtu. But mtu is
dynamic for each connection based on negotiation between endpoints, and
anything between them if mtu path discovery is working. If you attempted
to use a fixed packet size small enough to "never" fragment (in the
200's?), it would not be very efficient.

I have noticed that Linux may actually use a higher mtu than set for (and
shown in ifconfig) if it can. For example if I set my LAN nic to mtu 1492
(routed elsewhere through pppoe to internet), it still uses 1500 for
traffic within my LAN.
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A newbie socket programming question dnucit@gmail.com Linux Networking 0 07-11-2006 01:54 PM
misc.forsale.computers.net-hardware, misc.forsale.computers.pc-specific.misc, comp.sys.ibm.pc.hardware.networking Christopher Scott Windows Networking 0 04-08-2006 11:54 PM
General question about use of ports when programming with sockets 0to60 Windows Networking 4 10-10-2005 09:59 AM
Wireless PEAP/MSCHAPV2 client programming question Jim Howard Wireless Networks 6 07-02-2005 11:53 AM
Udp programming question RedCrow Linux Networking 3 04-18-2004 03:04 AM



1 2 3 4 5 6 7 8 9 10 11