NAME

Net::Async::UWSGI::Server::Connection - represents an incoming connection to a server

VERSION

version 0.006

DESCRIPTION

CONTENT_TYPE_HANDLER

METHODS

configure

Applies configuration parameters.

  • bus - the event bus

  • on_request - callback when we get an incoming request

json

Accessor for the current JSON state

on_read

Base read handler for incoming traffic.

Attempts to delegate to "dispatch_request" as soon as we get the UWSGI frame.

cancel

Cancels any request in progress.

If there's still a connection to the client, they'll receive a 500 response.

It's far more likely that the client has gone away, in which case there's no response to send.

env

Accessor for the UWSGI environment.

response

Resolves when the response is complete.

dispatch_request

At this point we have a request including headers, and we should know whether there's a body involved somewhere.

has_body

Returns true if we're expecting a request body for the current request method.

read_chunked

Read handler for chunked data. Unlikely to be used by any real implementations.

on_trailing_header

Deal with trailing headers. Not yet implemented.

read_to_length

Read up to the expected fixed length of data.

request_body

Accessor for the request body, available to the "finish_request" callback.

content_handler_json

Handle JSON content.

INHERITED METHODS

IO::Async::Stream

close, close_now, close_when_empty, connect, is_read_eof, is_write_eof, new_for_stdin, new_for_stdio, new_for_stdout, on_read_high_watermark, on_read_low_watermark, on_read_ready, on_write_ready, push_on_read, read_atmost, read_exactly, read_until, read_until_eof, want_readready_for_read, want_readready_for_write, want_writeready_for_read, want_writeready_for_write, write

IO::Async::Handle

bind, close_read, close_write, new_close_future, notifier_name, read_fileno, read_handle, set_handle, set_handles, socket, want_readready, want_writeready, write_fileno, write_handle

IO::Async::Notifier

add_child, adopt_future, can_event, children, configure_unknown, debug_printf, get_loop, invoke_error, invoke_event, loop, make_event_cb, maybe_invoke_event, maybe_make_event_cb, new, parent, remove_child, remove_from_parent

AUTHOR

Tom Molesworth <cpan@perlsite.co.uk>

LICENSE

Copyright Tom Molesworth 2013-2015. Licensed under the same terms as Perl itself.