Io.write with buffer size?

Hello all,

is there a way to do an io.write with a certain buffer size ?

I need to do the same as somebody else did in TcL like this:

fconfigure $file -buffersize 16 -buffering none -encoding binary
-translation binary

puts -nonewline $file [binary format “h*” $string]

Thanks

Axel

OS: Linux
Ruby 1.8.4

On 7/21/06, [email protected] [email protected]
wrote:

puts -nonewline $file [binary format “h*” $string]

Thanks

Not as such I am afraid.

If you do a write of your data having the size you need and flush the
stream, is that not good enough?
If I understand correctly you have alas no control over the OS buffer of
the
underlying stream. flushing the stream empties the Ruby buffer but not
more.

Cheers
Robert

Axel

OS: Linux
Ruby 1.8.4


Deux choses sont infinies : l’univers et la bêtise humaine ; en ce qui
concerne l’univers, je n’en ai pas acquis la certitude absolue.

  • Albert Einstein

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs