git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668993
13f79535-47bb-0310-9956-
ffa450edef68
end
def open?
- return !@handle.nil?
+ !@handle.nil?
end
def write(str)
if (data.length == 0)
raise TransportException.new(TransportException::UNKNOWN, "Socket: Could not read #{sz} bytes from #{@host}:#{@port}")
end
- return data
+ data
end
def close
end
def accept
- if (@handle != nil)
+ unless @handle.nil?
sock = @handle.accept
trans = Socket.new
trans.set_handle(sock)
- return trans
+ trans
end
- return nil
end
def close
@handle.close unless @handle.nil?
+ @handle = nil
end
end
deprecate_class! :TServerSocket => ServerSocket