Home > Back-end >  Socket transmission image files more characters
Socket transmission image files more characters

Time:10-16

At the time of testing, when use socket transmission image, every 8200 byte appear extra bytes as follows:
0 0 0 0 a 32 d a 30 30 d 30 0 d 0 a
I am using pure c socket to accept the binary stream data, more don't know why the above data,

 
While (ResponseLen & lt; FileLength)//cycle condition is less than the length of the FileLength
{
RecvNum=recv (LinkSocket FullBuffer + ResponseLen (char *), 1, 0).
If (RecvNum==0)
break;
ResponseLen +=RecvNum;
}

CodePudding user response:

To send?




.

CodePudding user response:

Should be 8192 bytes,
This is two carriage returns the text 2000 a carriage returns again

CodePudding user response:

8192 is the hex 2000

CodePudding user response:

This is the inside of the HTTP protocol? In order to show behind the data?

CodePudding user response:

reference 1st floor hyz_cs response:
send?




,,,

Send directly in PHP image files

CodePudding user response:

reference 5 floor gaoxin1076 reply:
Quote: refer to 1st floor hyz_cs response:

To send?
,,,

Send directly in PHP image files


How do you know what is receiving much, perhaps when I was sending the data, and check the PHP sends the data format of the picture,
  • Related