Thread: file IO speed over network

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by CommonTater View Post
    At least on windows the filesize reported from the network is powers of 2... and since that's the size of the buffer you need intermediate math, regardless of how well contrived, isn't going to be very helpful.
    That may well be, because the system wants to be consistent in reporting file sizes and those should be measured in memory units. But WRT to networking, a megabit is considered to be exactly 1 000 000 bits. Not 1024 kB (which is 5% more). So when you see speeds reported as "100 Mbits/sec", that's what it is -- there is no ambiguity.

    Why do people always have to complicate things so much... You get a file size of 12412322 you need a buffer size of 12412322... and, guess what, they designed it that way for our convenience.
    Yeah, a byte is a byte is a byte. I was just being a stickler.
    Last edited by MK27; 09-02-2011 at 09:55 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. to receive image file through network port
    By nadeem athani in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-03-2011, 08:50 PM
  2. Speed of pointers vs. speed of arrays/structs
    By Kempelen in forum C Programming
    Replies: 32
    Last Post: 06-27-2008, 10:16 AM
  3. file transfer across network
    By kris.c in forum Networking/Device Communication
    Replies: 6
    Last Post: 06-17-2006, 01:08 PM
  4. Network File Copy in DR DOS
    By daron in forum C Programming
    Replies: 3
    Last Post: 09-30-2005, 01:49 AM
  5. File I/O on Network drive, Quick Question
    By kransk in forum C++ Programming
    Replies: 3
    Last Post: 11-24-2003, 09:17 AM