ostream.h revision 5238111c460098d9cc8cc22527026138a278b9a4
Pretty much the only real reason to return 0 is if you wish to send more data to client which isn't buffered, eg. o_stream_send_istream(). */ /* Create new output stream from given file descriptor. If max_buffer_size is 0, an "optimal" buffer size is used (max 128kB). */ /* Reference counting. References start from 1, so calling o_stream_unref() destroys the stream if o_stream_ref() is never used. */ /* Mark the stream closed. Nothing will be sent after this call. */ /* Set IO_WRITE callback. Default will just try to flush the output and finishes when the buffer is empty. */ /* Change the maximum size for stream's output buffer to grow. */ /* Delays sending as far as possible, writing only full buffers. Also sets TCP_CORK on if supported. */ /* Flush the output stream, blocks until everything is sent. Returns 1 if ok, -1 if error. */ /* Set "flush pending" state of stream. If set, the flush callback is called when more data is allowed to be sent, even if the buffer itself is empty. */ /* Returns number of bytes currently in buffer. */ /* Seek to specified position from beginning of file. This works only for files. Returns 1 if successful, -1 if error. */ /* Returns number of bytes sent, -1 = error */ /* Send data from input stream. Returns number of bytes sent, or -1 if error. Note that this function may block if either instream or outstream is It's also possible to use this function to copy data within same file descriptor. If the file must be grown, you have to do it manually before calling this function. */