Files
metasploit-gs/lib/rex/ui/text/output/socket.rb
T
Ramon de C Valle f124597a56 Code cleanups
git-svn-id: file:///home/svn/framework3/trunk@5773 4d416f70-5f16-0410-b530-b9f4589650da
2008-10-19 21:03:39 +00:00

31 lines
350 B
Ruby

require 'rex/ui'
module Rex
module Ui
module Text
###
#
# This class implements the output interface against a socket.
#
###
class Output::Socket < Rex::Ui::Text::Output
def initialize(sock)
@sock = sock
end
#
# Prints the supplied message to the socket.
#
def print(msg = '')
@sock.write(msg)
@sock.flush
msg
end
end
end
end
end