in reply to Re^8: sysread and syswrite in tcp sockets
in thread sysread and syswrite in tcp sockets

Hi, thanks for all the help there.

From the comments you all have given, i reckon that the best way to receive data is to have have it's size known in the first place

However, in my case it's not desirable to add more bytes to indicate the size of data. I know 4 bytes isn't alot, but i'm consider maximum cost saving of bandwidth.

Thus, I guess the alternative way is to use time as the indicator to separate the different data together.

Thanks for all the input. I will test out further to see what I can get

  • Comment on Re^9: sysread and syswrite in tcp sockets

Replies are listed 'Best First'.
Re^10: sysread and syswrite in tcp sockets
by BrowserUk (Patriarch) on Jan 09, 2009 at 08:35 UTC
    I know 4 bytes isn't alot, but i'm consider maximum cost saving of bandwidth.... the alternative way is to use time as the indicator

    That doesn't make a lot of sense. All the time you spend waiting is equally wasted badwidth. Use or lose it.

    If you're thinking about the cost of those extra 4-bytes, you said the file sizes are 10.5k, which means those 4 bytes represent 0.009% of your traffic. How much can that be?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.