| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <title>Channel output proc</title> |
| <link rel="stylesheet" href="style.css"> |
| </head> |
| |
| <body> |
| <? prevnext "<h1>Channel output proc</h1>" ?> |
| |
| <p>A small example of the junction where Tcl and Apache meet.</p> |
| |
| <pre> |
| static int |
| outputproc(ClientData instancedata, char *buf, |
| int toWrite, int *errorCodePtr) |
| { |
| rivet_server_conf *rsc = (rivet_server_conf *)instancedata; |
| rivet_interp_globals *globals = |
| Tcl_GetAssocData(rsc->server_interp, "rivet", NULL); |
| |
| TclWeb_PrintHeaders(globals->req); |
| if (globals->req->content_sent == 0) |
| { |
| ap_rwrite(buf, toWrite, globals->r); |
| ap_rflush(globals->r); |
| } |
| return toWrite; |
| } |
| </pre> |
| |
| <?footer?> |
| </body> |
| </html> |