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