Sambar Server Documentation

sa_send_file


Purpose

Sends the contents of a file (back) in response to a client request.

Syntax

sa_send_file (context, connection, filename, length);

SA_CTX *context;
SA_CONN *connection;
SA_CHAR *filename;
SA_INT length;

Parameters

context Server context.

connection Client connection.

filename The name of the file to send (back).

length The length of the name of the file to send (back).

Returns

SA_SUCCEED if the function is successful; SA_FAIL otherwise.

Comments

This API sends the entire contents of a file to the client as part of the content stream in response to the client's request. Additional data can be sent in response to the request using either the sa_conn_send or sa_send_file APIs.

See Also

None

© 1998 Sambar Technologies. All rights reserved. Terms of Use.