class Rex::Ui::Text::Output::Socket
This class implements the output interface against a socket.
Public Class Methods
new(sock)
click to toggle source
Calls superclass method
Rex::Ui::Text::Output::new
# File lib/rex/ui/text/output/socket.rb, line 14 def initialize(sock) @sock = sock super() end
Public Instance Methods
print_raw(msg = '')
click to toggle source
Prints the supplied message to the socket.
# File lib/rex/ui/text/output/socket.rb, line 32 def print_raw(msg = '') @sock.write(msg) @sock.flush msg end
supports_color?()
click to toggle source
# File lib/rex/ui/text/output/socket.rb, line 19 def supports_color? case config[:color] when true # Allow color if the user forces it on return true else false end end