http_should_keep_alive function

  1. @Native<Int Function(Pointer<http_parser>)>(ffi.Pointer<http_parser>)>()
int http_should_keep_alive(
  1. Pointer<http_parser> parser
)

If http_should_keep_alive() in the on_headers_complete or on_message_complete callback returns 0, then this should be the last message on the connection. If you are the server, respond with the "Connection: close" header. If you are the client, close the connection.

Implementation

@ffi.Native<ffi.Int Function(ffi.Pointer<http_parser>)>()
external int http_should_keep_alive(ffi.Pointer<http_parser> parser);