#include <P_NetAccept.h>
Inherits Continuation.
Inherited by SSLNetAccept.

| Public Member Functions | |
| virtual EventType | getEtype () const | 
| virtual NetProcessor * | getNetProcessor () const | 
| void | init_accept_loop (const char *) | 
| virtual void | init_accept (EThread *t=NULL) | 
| virtual void | init_accept_per_thread () | 
| virtual NetAccept * | clone () const | 
| int | do_listen (bool non_blocking, bool transparent=false) | 
| int | do_blocking_accept (EThread *t) | 
| virtual int | acceptEvent (int event, void *e) | 
| virtual int | acceptFastEvent (int event, void *e) | 
| int | acceptLoopEvent (int event, Event *e) | 
| void | cancel () | 
| NetAccept () | |
| virtual | ~NetAccept () | 
| Data Fields | |
| ink_hrtime | period | 
| Server | server | 
| void * | alloc_cache | 
| AcceptFunctionPtr | accept_fn | 
| int | ifd | 
| bool | callback_on_open | 
| bool | backdoor | 
| Ptr< NetAcceptAction > | action_ | 
| int | recv_bufsize | 
| int | send_bufsize | 
| uint32_t | sockopt_flags | 
| uint32_t | packet_mark | 
| uint32_t | packet_tos | 
| EventType | etype | 
| UnixNetVConnection * | epoll_vc | 
| EventIO | ep | 
Definition at line 84 of file P_NetAccept.h.
| NetAccept::NetAccept | ( | ) | 
Definition at line 528 of file UnixNetAccept.cc.
| virtual NetAccept::~NetAccept | ( | ) |  [inline, virtual] | 
Definition at line 120 of file P_NetAccept.h.
References action_.
| int NetAccept::acceptEvent | ( | int | event, | |
| void * | e | |||
| ) |  [virtual] | 
Definition at line 319 of file UnixNetAccept.cc.
References accept_fn, action_, Connection::addr, ats_ip_port_host_order(), Action::cancel(), Event::ethread, Continuation::mutex, MUTEX_TRY_LOCK, net_accepts_currently_open_stat, NET_DECREMENT_DYN_STAT, server, and Warning.
Referenced by init_accept(), init_accept_per_thread(), and SSLNetAccept::init_accept_per_thread().
| int NetAccept::acceptFastEvent | ( | int | event, | |
| void * | e | |||
| ) |  [virtual] | 
Definition at line 363 of file UnixNetAccept.cc.
References SocketManager::accept(), ACCEPT, accept_error_seriousness(), accept_till_done, action_, Connection::addr, NetProcessor::allocate_vc(), ats_ip_copy(), backdoor, Action::cancel(), check_net_throttle(), check_transient_accept_error(), Connection::close(), close_UnixNetVConnection(), UnixNetVConnection::con, Debug, UnixNetVConnection::ep, Event::ethread, EVENT_ERROR, Server::f_inbound_transparent, Connection::fd, UnixNetVConnection::free(), get_NetHandler(), get_PollDescriptor(), getNetProcessor(), UnixNetVConnection::id, ifd, ink_get_hrtime(), likely, UnixNetVConnection::mainEvent(), Continuation::mutex, net_accepts_currently_open_stat, net_connections_currently_open_stat, NET_DECREMENT_DYN_STAT, NET_EVENT_ACCEPT, net_next_connection_number(), NET_SUM_GLOBAL_DYN_STAT, new_ProxyMutex(), UnixNetVConnection::nh, packet_mark, packet_tos, UnixNetVConnection::read, recv_bufsize, ROUNDUP, IpEndpoint::sa, safe_nonblocking(), safe_setsockopt(), send_bufsize, server, UnixNetVConnection::server_addr, SET_CONTINUATION_HANDLER, NetVConnection::set_is_transparent(), SocketManager::set_rcvbuf_size(), SocketManager::set_sndbuf_size(), socketManager, sockopt_flags, SOCKOPT_ON, EventIO::start(), UnixNetVConnection::submit_time, NetVConnection::thread, NetState::triggered, unlikely, and Warning.
Referenced by init_accept_per_thread(), and SSLNetAccept::init_accept_per_thread().
| int NetAccept::acceptLoopEvent | ( | int | event, | |
| Event * | e | |||
| ) | 
Definition at line 507 of file UnixNetAccept.cc.
References do_blocking_accept(), net_accepts_currently_open_stat, NET_DECREMENT_DYN_STAT, and this_ethread().
Referenced by init_accept_loop().
| void NetAccept::cancel | ( | void | ) | 
Definition at line 549 of file UnixNetAccept.cc.
References action_, Connection::close(), and server.
| NetAccept * NetAccept::clone | ( | ) | const  [virtual] | 
Reimplemented in SSLNetAccept.
Definition at line 556 of file UnixNetAccept.cc.
Referenced by UnixNetProcessor::accept_internal(), and init_accept_per_thread().
| int NetAccept::do_blocking_accept | ( | EThread * | t | ) | 
Definition at line 236 of file UnixNetAccept.cc.
References Server::accept(), ACCEPT, accept_error_seriousness(), accept_till_done, UnixNetVConnection::acceptEvent(), UnixNetVConnection::action_, action_, Connection::addr, alloc_cache, NetProcessor::allocate_vc(), ats_ip_copy(), backdoor, check_emergency_throttle(), check_net_throttle(), check_throttle_warning(), check_transient_accept_error(), Connection::close(), UnixNetVConnection::con, EVENT_ERROR, eventProcessor, Server::f_inbound_transparent, Connection::fd, UnixNetVConnection::from_accept_thread, getEtype(), getNetProcessor(), UnixNetVConnection::id, ink_get_hrtime(), Continuation::mutex, MUTEX_LOCK, MUTEX_UNTAKE_LOCK, net_connections_currently_open_stat, net_next_connection_number(), NET_SUM_GLOBAL_DYN_STAT, NET_THROTTLE_DELAY, new_ProxyMutex(), packet_mark, packet_tos, safe_delay(), safe_setsockopt(), EventProcessor::schedule_imm_signal(), send_throttle_message(), server, UnixNetVConnection::server_addr, SET_CONTINUATION_HANDLER, NetVConnection::set_is_transparent(), UnixNetVConnection::submit_time, UnixNetProcessor::throttle_error_message, unix_netProcessor, and Warning.
Referenced by acceptLoopEvent().
| int NetAccept::do_listen | ( | bool | non_blocking, | |
| bool | transparent = false | |||
| ) | 
Definition at line 210 of file UnixNetAccept.cc.
References Server::accept_addr, action_, callback_on_open, Connection::fd, Server::listen(), Continuation::mutex, NET_EVENT_ACCEPT_FAILED, NET_EVENT_ACCEPT_SUCCEED, NO_FD, IpEndpoint::port(), recv_bufsize, send_bufsize, server, Server::setup_fd_for_listen(), and Warning.
Referenced by UnixNetProcessor::accept_internal(), init_accept(), init_accept_per_thread(), and SSLNetAccept::init_accept_per_thread().
| EventType NetAccept::getEtype | ( | ) | const  [virtual] | 
Reimplemented in SSLNetAccept.
Definition at line 567 of file UnixNetAccept.cc.
References etype.
Referenced by do_blocking_accept().
| NetProcessor * NetAccept::getNetProcessor | ( | ) | const  [virtual] | 
Reimplemented in SSLNetAccept.
Definition at line 573 of file UnixNetAccept.cc.
References netProcessor.
Referenced by acceptFastEvent(), do_blocking_accept(), and net_accept().
| void NetAccept::init_accept | ( | EThread * | t = NULL | ) |  [virtual] | 
Definition at line 163 of file UnixNetAccept.cc.
References acceptEvent(), action_, EventProcessor::assign_thread(), do_listen(), etype, eventProcessor, Thread::mutex, NON_BLOCKING, period, EThread::schedule_every(), and SET_HANDLER.
Referenced by UnixNetProcessor::accept_internal().
| void NetAccept::init_accept_loop | ( | const char * | thr_name | ) | 
Definition at line 145 of file UnixNetAccept.cc.
References acceptLoopEvent(), eventProcessor, REC_ReadConfigInteger, SET_CONTINUATION_HANDLER, and EventProcessor::spawn_thread().
Referenced by UnixNetProcessor::accept_internal().
| void NetAccept::init_accept_per_thread | ( | ) |  [virtual] | 
Reimplemented in SSLNetAccept.
Definition at line 181 of file UnixNetAccept.cc.
References a, accept_fn, acceptEvent(), acceptFastEvent(), clone(), do_listen(), ep, etype, eventProcessor, EventProcessor::eventthread, get_NetHandler(), get_PollDescriptor(), Continuation::mutex, EventProcessor::n_threads_for_type, net_accept, NON_BLOCKING, period, EThread::schedule_every(), SET_HANDLER, EventIO::start(), and Warning.
Referenced by UnixNetProcessor::accept_internal().
Definition at line 89 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptEvent(), init_accept_per_thread(), and SSLNetAccept::init_accept_per_thread().
Definition at line 93 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptEvent(), acceptFastEvent(), cancel(), do_blocking_accept(), do_listen(), init_accept(), net_accept(), and ~NetAccept().
| void* NetAccept::alloc_cache | 
Definition at line 88 of file P_NetAccept.h.
Referenced by do_blocking_accept(), and net_accept().
| bool NetAccept::backdoor | 
Definition at line 92 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptFastEvent(), and do_blocking_accept().
Definition at line 91 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), and do_listen().
Definition at line 101 of file P_NetAccept.h.
Referenced by init_accept_per_thread(), and SSLNetAccept::init_accept_per_thread().
Definition at line 100 of file P_NetAccept.h.
Definition at line 99 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), getEtype(), init_accept(), init_accept_per_thread(), SSLNetAccept::init_accept_per_thread(), and net_accept().
| int NetAccept::ifd | 
Definition at line 90 of file P_NetAccept.h.
Referenced by acceptFastEvent().
| uint32_t NetAccept::packet_mark | 
Definition at line 97 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptFastEvent(), and do_blocking_accept().
| uint32_t NetAccept::packet_tos | 
Definition at line 98 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptFastEvent(), and do_blocking_accept().
Definition at line 86 of file P_NetAccept.h.
Referenced by init_accept(), init_accept_per_thread(), and SSLNetAccept::init_accept_per_thread().
Definition at line 94 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptFastEvent(), and do_listen().
Definition at line 95 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptFastEvent(), and do_listen().
Definition at line 87 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), acceptEvent(), acceptFastEvent(), cancel(), do_blocking_accept(), do_listen(), net_accept(), send_throttle_message(), and EventIO::start().
| uint32_t NetAccept::sockopt_flags | 
Definition at line 96 of file P_NetAccept.h.
Referenced by UnixNetProcessor::accept_internal(), and acceptFastEvent().
 1.7.1
 1.7.1