Difference between revisions of "Ns connsendfp"

From AOLserver Wiki
Jump to navigation Jump to search
(New page: '''NAME''' : ns_connsendfp - Write bytes from an open channel to the current connection's socket. '''SYNOPSIS''' : '''ns_connsendfp''' ''?connId? chanId nbytes'' '''DESCRIPTION''' : T...)
 
 
Line 13: Line 13:
 
: You must specify the number of bytes to be copied in the ''nbytes'' argument.  ''chanId'' is channel identifier such as returned by the Tcl command open.
 
: You must specify the number of bytes to be copied in the ''nbytes'' argument.  ''chanId'' is channel identifier such as returned by the Tcl command open.
  
: This command is deprecated in favor of [[ns_writefp], which does the exact same thing.  The difference is ns_writefp allows the ''nbytes'' argument to be omitted but it does not accept the legacy connid parameter.
+
: This command is deprecated in favor of [[ns_writefp]], which does the exact same thing.  The difference is ns_writefp allows the ''nbytes'' argument to be omitted but it does not accept the legacy connid parameter.
  
 
'''SEE ALSO'''
 
'''SEE ALSO'''

Latest revision as of 05:16, 14 October 2009

NAME

ns_connsendfp - Write bytes from an open channel to the current connection's socket.

SYNOPSIS

ns_connsendfp ?connId? chanId nbytes

DESCRIPTION

This command writes the contents of a file or other open channel referenced by chanId immediately to the current connection's socket. It can be used in place of ns_returnfp or ns_respond to send back responses. AOLserver will not include any headers when using ns_connsendfp.
You must specify the number of bytes to be copied in the nbytes argument. chanId is channel identifier such as returned by the Tcl command open.
This command is deprecated in favor of ns_writefp, which does the exact same thing. The difference is ns_writefp allows the nbytes argument to be omitted but it does not accept the legacy connid parameter.

SEE ALSO

ns_startcontent, ns_write, ns_return

Category Documentation - Category Core Tcl API