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]

 



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

-- 
Erik Mouw
J.A.K.Mouw@xxxxxxxxxxxxxx  mouw@xxxxxxxxxxxx

Attachment: signature.asc
Description: Digital signature


[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