[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_ConnCopyToFile

Overview

Copy data from connection to a file

Syntax

    int Ns_ConnCopyToFile(
    	Ns_Conn *conn,
    	size_t   iToCopy,
    	FILE    *fp
    );

Description

The Ns_ConnCopyToFile function copies iToCopy bytes of data from the connection to the file pointed to by fp. Ns_ConnCopyToFile returns a status of NS_OK or NS_ERROR.

Example

    	/* Copy the content from the browser to a file. */
    	FILE *fp;
    	int len;
    
    	fp = fopen("content.out", "w");
    	len = Ns_ConnContentLength(conn);
    	Ns_ConnCopyToFile(conn, len, fp);
    	fclose(fp);

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.