Method: Net::HTTP::Server::ChunkedStream#close

Defined in:
lib/net/http/server/chunked_stream.rb

#closeObject

Closes the chunked stream.

Since:

  • 0.2.0



106
107
108
109
110
# File 'lib/net/http/server/chunked_stream.rb', line 106

def close
  # last chunk
  @socket.write("0\r\n\r\n")
  @socket.flush
end