Make it clear that all Rex::IO::Stream implementations must accept a second parameter called opts for the read, write, and put methods

git-svn-id: file:///home/svn/framework3/trunk@12515 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2011-05-02 21:39:09 +00:00
parent 8fd84e3c3d
commit d98f8dfd89
3 changed files with 10 additions and 10 deletions

View File

@ -21,13 +21,13 @@ module Auxiliary::CommandShell
# Ghetto
#
module CRLFLineEndings
def put(str)
def put(str, opts={})
return super if not str
super(str.strip + "\r\n")
super(str.strip + "\r\n", opts)
end
def write(str)
def write(str, opts={})
return super if not str
super(str.strip + "\r\n")
super(str.strip + "\r\n", opts)
end
end

View File

@ -266,12 +266,12 @@ protected
}
end
def write(buf)
@sock_inp.write(buf)
def write(buf, opts={})
@sock_inp.write(buf, opts)
end
def read(length=0)
@sock_out.read(length)
def read(length=0, opts={})
@sock_out.read(length, opts)
end
#

View File

@ -74,8 +74,8 @@ class RingBuffer
# Push data back into the associated stream socket. Logging must occur
# elsewhere, this function is simply a passthrough.
#
def put(data)
self.fd.put(data)
def put(data, opts={})
self.fd.put(data, opts={})
end
#