Audiovox P965 Datenblatt Seite 68

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 280
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 67
API in C using winsock
65
recv(fdSock, &cLength[1], 1, 0);
recv(fdSock, &cLength[2], 1, 0);
recv(fdSock, &cLength[3], 1, 0);
}
iLen = (int *)cLength;
}
// read 3 bytes
else if ((cFirstChar & 0xC0) == 0xC0)
{
DEBUG ? printf("3-byte encoded length\n") : 0;
if (iLittleEndian)
{
cLength[2] = cFirstChar;
cLength[2] &= 0x3f; // mask out the 1st 2 bits
recv(fdSock, &cLength[1], 1, 0);
recv(fdSock, &cLength[0], 1, 0);
}
else
{
cLength[1] = cFirstChar;
cLength[1] &= 0x3f; // mask out the 1st 2 bits
recv(fdSock, &cLength[2], 1, 0);
recv(fdSock, &cLength[3], 1, 0);
}
iLen = (int *)cLength;
}
// read 2 bytes
else if ((cFirstChar & 0x80) == 0x80)
{
DEBUG ? printf("2-byte encoded length\n") : 0;
if (iLittleEndian)
{
cLength[1] = cFirstChar;
cLength[1] &= 0x7f; // mask out the 1st bit
recv(fdSock, &cLength[0], 1, 0);
}
else
{
cLength[2] = cFirstChar;
cLength[2] &= 0x7f; // mask out the 1st bit
recv(fdSock, &cLength[3], 1, 0);
Seitenansicht 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 279 280

Kommentare zu diesen Handbüchern

Keine Kommentare