Re: how to get the exact size when i send the image using send()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sorry.i need to receive the image file as exactly as sending image.my image size is aroung 250 MB.how to i send it.whther i want compressed it and send it.

thanks

Erik Mouw wrote:
On Sun, Feb 27, 2005 at 12:35:00PM +0530, Muruganandam wrote:

how to send the image file using sockets,i want to get the exact size in the client side.i was using the send the image file as 1 bit at a time.at the receiving end i got additional zeros.can anyone tell me the solutions.


Not kernel related, but anyway.

You can't send things 1 bit at a time (well, not without additional
overhead), the minimum transfer size is 1 byte. If you try to send 1
bit at a time, you get an additional overhead of the 7 other bits in a
byte.

Because this is a basic networking question, I suggest to read one of
the Stevens books on networking. See http://www.kohala.com/start/ .


Erik



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux