ostream.h revision 007d354a674fb3ddf49db160cf050cf61270a1a0
/* 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. */ /* Change the maximum size for stream's output buffer to grow. */ /* Stream is made to be flushed out whenever it gets full (assumes max_size is already set), ie. writes will never be partial. Also makes any blocking writes to fail after specified timeout, calling timeout_cb if it's set. This call changes non-blocking state of file descriptor. */ /* Delays sending as far as possible, writing only full buffers. Also sets TCP_CORK on if supported. o_stream_flush() removes the cork. */ /* Flush the output stream, blocks until everything is sent. Returns 1 if ok, -1 if error. */ /* Returns 1 if specified amount of data currently fits into stream's output /* 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 or buffered, or -1 if disconnected */ /* 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. */