Files
metasploit-gs/lib/rex/ui/text/output/socket.rb
T
Matt Miller 5bb104c993 msfd
git-svn-id: file:///home/svn/incoming/trunk@3146 4d416f70-5f16-0410-b530-b9f4589650da
2005-11-28 16:36:06 +00:00

32 lines
351 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