#include <P_UnixNetProcessor.h>
Inherits NetProcessor.
Inherited by SSLNetProcessor.
Public Member Functions | |
virtual Action * | accept_internal (Continuation *cont, int fd, AcceptOptions const &opt) |
Action * | connect_re_internal (Continuation *cont, sockaddr const *target, NetVCOptions *options=NULL) |
Action * | connect (Continuation *cont, UnixNetVConnection **vc, sockaddr const *target, NetVCOptions *opt=NULL) |
virtual void | upgradeEtype (EventType &) |
virtual NetAccept * | createNetAccept () |
virtual NetVConnection * | allocate_vc (EThread *t) |
virtual int | start (int number_of_net_threads, size_t stacksize) |
Starts the Netprocessor. | |
Data Fields | |
char * | throttle_error_message |
Event * | accept_thread_event |
off_t | netHandler_offset |
off_t | pollCont_offset |
int | n_netthreads |
EThread ** | netthreads |
Definition at line 36 of file P_UnixNetProcessor.h.
Action * UnixNetProcessor::accept_internal | ( | Continuation * | cont, | |
int | fd, | |||
AcceptOptions const & | opt | |||
) | [virtual] |
Definition at line 85 of file UnixNetProcessor.cc.
References a, Server::accept_addr, NetAccept::accept_fn, NetProcessor::AcceptOptions::accept_threads, NetAccept::action_, IpEndpoint::assign(), ats_ip_copy(), ats_ip_port_host_order(), NetProcessor::AcceptOptions::backdoor, NetAccept::backdoor, BLOCKING, NetAccept::callback_on_open, NetAccept::clone(), createNetAccept(), Debug, NetAccept::do_listen(), Error, ET_NET, NetAccept::etype, NetProcessor::AcceptOptions::etype, NetProcessor::AcceptOptions::f_callback_on_open, NetProcessor::AcceptOptions::f_inbound_transparent, Server::f_inbound_transparent, Connection::fd, NetProcessor::AcceptOptions::frequent_accept, Server::http_accept_filter, NetAccept::init_accept(), NetAccept::init_accept_loop(), NetAccept::init_accept_per_thread(), ink_assert, NetProcessor::AcceptOptions::ip_family, IpAddr::isValid(), NetProcessor::AcceptOptions::local_ip, NetProcessor::AcceptOptions::local_port, NetProcessor::AcceptOptions::localhost_only, MAX_THREAD_NAME_LENGTH, Continuation::mutex, Thread::mutex, net_accept, net_accepts_currently_open_stat, NET_INCREMENT_DYN_STAT, NetProcessor::AcceptOptions::packet_mark, NetAccept::packet_mark, NetProcessor::AcceptOptions::packet_tos, NetAccept::packet_tos, IpEndpoint::port(), REC_ReadConfigInteger, NetProcessor::AcceptOptions::recv_bufsize, NetAccept::recv_bufsize, NetProcessor::AcceptOptions::send_bufsize, NetAccept::send_bufsize, NetAccept::server, IpEndpoint::setToAnyAddr(), IpEndpoint::setToLoopback(), NetProcessor::AcceptOptions::sockopt_flags, NetAccept::sockopt_flags, this_ethread(), and upgradeEtype().
Referenced by NetProcessor::main_accept().
NetVConnection * UnixNetProcessor::allocate_vc | ( | EThread * | t | ) | [virtual] |
Implements NetProcessor.
Reimplemented in SSLNetProcessor.
Definition at line 457 of file UnixNetProcessor.cc.
References UnixNetVConnection::from_accept_thread, likely, netVCAllocator, and THREAD_ALLOC.
Referenced by connect_re_internal().
Action * UnixNetProcessor::connect | ( | Continuation * | cont, | |
UnixNetVConnection ** | vc, | |||
sockaddr const * | target, | |||
NetVCOptions * | opt = NULL | |||
) |
Definition at line 269 of file UnixNetProcessor.cc.
References NetProcessor::connect_re().
Action * UnixNetProcessor::connect_re_internal | ( | Continuation * | cont, | |
sockaddr const * | target, | |||
NetVCOptions * | options = NULL | |||
) |
Definition at line 190 of file UnixNetProcessor.cc.
References SocksEntry::action_, UnixNetVConnection::action_, allocate_vc(), ats_ip_copy(), ats_ip_nptop(), ats_is_ip(), CONNECT_SUCCESS, UnixNetVConnection::connectUp(), IpMap::contains(), Debug, NetVCOptions::etype, eventProcessor, SocksEntry::free(), get_NetHandler(), UnixNetVConnection::id, INET6_ADDRPORTSTRLEN, SocksEntry::init(), ink_get_hrtime(), socks_conf_struct::ip_map, EThread::is_event_type(), SocksEntry::lerrno, Continuation::mutex, MUTEX_TRY_LOCK, net_connections_currently_open_stat, net_next_connection_number(), NET_SUM_GLOBAL_DYN_STAT, NO_FD, NO_SOCKS, NetVConnection::options, EventProcessor::schedule_imm(), SocksEntry::server_addr, UnixNetVConnection::server_addr, UnixNetVConnection::setSSLClientConnection(), NetProcessor::socks_conf_stuff, SOCKS_DEFAULT_VERSION, socks_conf_struct::socks_needed, NetVCOptions::socks_support, NetVCOptions::socks_version, socksAllocator, UnixNetVConnection::submit_time, ProxyMutex::thread_holding, and upgradeEtype().
NetAccept * UnixNetProcessor::createNetAccept | ( | ) | [virtual] |
Reimplemented in SSLNetProcessor.
Definition at line 451 of file UnixNetProcessor.cc.
Referenced by accept_internal().
int UnixNetProcessor::start | ( | int | number_of_net_threads, | |
size_t | stacksize | |||
) | [virtual] |
Starts the Netprocessor.
This has to be called before doing any other net call.
number_of_net_threads | is not used. The net processor uses the Event Processor threads for its activity. |
Implements NetProcessor.
Reimplemented in SSLNetProcessor.
Definition at line 394 of file UnixNetProcessor.cc.
References socks_conf_struct::accept_enabled, EventProcessor::allocate(), change_net_connections_throttle(), ET_NET, eventProcessor, EventProcessor::eventthread, initialize_thread_for_http_sessions(), initialize_thread_for_net(), loadSocksConfiguration(), n_netthreads, EventProcessor::n_threads_for_type, netHandler_offset, netProcessor, netthreads, pollCont_offset, RecData::rec_int, RECD_INT, StatPagesManager::register_http(), register_ShowNet(), NetProcessor::socks_conf_stuff, socks_conf_struct::socks_needed, statPagesManager, upgradeEtype(), and Warning.
virtual void UnixNetProcessor::upgradeEtype | ( | EventType & | ) | [inline, virtual] |
Reimplemented in SSLNetProcessor.
Definition at line 59 of file P_UnixNetProcessor.h.
Referenced by accept_internal(), connect_re_internal(), and start().
Definition at line 67 of file P_UnixNetProcessor.h.
Definition at line 74 of file P_UnixNetProcessor.h.
Referenced by start().
Definition at line 70 of file P_UnixNetProcessor.h.
Referenced by get_NetHandler(), and start().
Definition at line 75 of file P_UnixNetProcessor.h.
Referenced by start().
Definition at line 71 of file P_UnixNetProcessor.h.
Referenced by get_PollCont(), and start().
Definition at line 66 of file P_UnixNetProcessor.h.
Referenced by NetAccept::do_blocking_accept(), and send_throttle_message().