Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login

GLib::UnixOutputStream

class GLib::UnixOutputStream

GLib::UnixOutputStream implements GLib::OutputStream for writing to a Unix file descriptor, including asynchronous operations. The file descriptor must be selectable, so it doesn’t work with opened files.

Note that Glib::UnixOutputStream belongs to the Unix-specific GIO interfaces.

Class Methods

GLib::UnixOutputStream.new(fd, close_fd = false)

Creates a new GLib::UnixOutputStream for the given fd.

If close_fd is true, the file descriptor will be closed when the stream is closed.

  • fd: the file descriptor
  • close_fd: Whether or not the file descriptor should be closed when the stream is closed
  • Returns: a new GLib::UnixOutputStream

Instance Methods

close_fd=(close_fd)
Same as GLib::UnixInputStream#set_close_fd.
  • Returns: close_fd
close_fd?
Checks if the file descriptor should be closed when the stream is closed.
  • Returns: true if the file descriptor should be closed when the stream is closed
fd
Gets the file descriptor to read from.
  • Returns: The file descriptor to read from
set_close_fd(close_fd)
Sets whether or not the file descriptor should be closed when the stream is closed.
  • close_fd: true if file descriptor should be closed when the stream is closed
  • Returns: self

Properties

close-fd: true or false (Read/Write)
Whether or not the file descriptor should be closed when the stream is closed
fd: Integer (Read/Write)
The file descriptor to read from
Last modified:2010/12/27 21:59:23
Keyword(s):
References:[GLib::OutputStream] [GLib::UnixOutputStream] [index-ruby-glib2] [index-ruby-gio2] [Ruby/GIO]