# File lib/rfuzz/client.rb, line 368 368: def send_request(method, uri, req) 369: begin 370: sock = nil 371: notify :connect do 372: sock = TCPSocket.new(@host, @port) 373: end 374: 375: out = StringIO.new 376: body = build_request(out, method, uri, req) 377: 378: notify :send_request do 379: sock.write(out.string + body) 380: sock.flush 381: end 382: 383: return read_response(sock) 384: rescue Object 385: raise $! 386: ensure 387: sock.close unless (!sock or sock.closed?) 388: end 389: end