#!/bin/ch /* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */ #include int main() { class CResponse Response; class CRequest Request; int total; size_t countToRead; Response.begin(); Response.title(L"Test of Request.binaryRead and Request.getTotalBytes"); printf("

Test of Request.binaryRead and Request.getTotalBytes


\n"); total = Request.getTotalBytes(); printf("The result of Request.getTotalBytes is : %d

\n", total); // countToRead = total; // printf("The raw data is : %s

\n", Request.binaryRead(&countToRead)); // printf("The actually read bytes is : %d

\n", countToRead); countToRead = 4; printf("To read %d bytes data.
\n", countToRead); printf("The raw data is : %s
\n", Request.binaryRead(&countToRead)); printf("The actually read bytes is : %d

\n", countToRead); countToRead = 5; printf("To read %d bytes data.
\n", countToRead); printf("The raw data is : %s
\n", Request.binaryRead(&countToRead)); printf("The actually read bytes is : %d

\n", countToRead); countToRead = 50; printf("To read %d bytes data.
\n", countToRead); printf("The raw data is : %s
\n", Request.binaryRead(&countToRead)); printf("The actually read bytes is : %d

\n", countToRead); Response.end(); }