Sending Image From PC to PPC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to send a image from PC to PPC by using socket and BinaryWriter
and BinaryReader. The coding is as below:

PC Server:

writer.Write(byteArray.Length);
writer.Write(byteArray);

PPC Client:

int len = reader.ReadInt32();
byte[] Img = new byte[len];

if (len != 0) {
img = reader.ReadBytes(len);
}

The above method work perfectly in PC to PC transmission, but not work for
PC to PCC. Only 32715 Bytes (around 32KB) received by the PPC client, but the
actual size of the image being sent is for example 700KB. What's wrong for
the different behavior for the same coding in PC and PPC? Does anyone have
any idea of this problem?
 
Maybe the problem is in the size of the socket channels.

You should use buffers to handle files with 700kb of size.

Eduardo Klein
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top