#include <P_UDPNet.h>
Inherits UDPNetProcessor.
Public Member Functions | |
virtual int | start (int n_udp_threads, size_t stacksize) |
Starts execution of the processor. | |
void | udp_read_from_net (UDPNetHandler *nh, UDPConnection *uc) |
int | udp_callback (UDPNetHandler *nh, UDPConnection *uc, EThread *thread) |
Data Fields | |
off_t | pollCont_offset |
off_t | udpNetHandler_offset |
Definition at line 47 of file P_UDPNet.h.
int UDPNetProcessorInternal::start | ( | int | number_of_threads, | |
size_t | stacksize | |||
) | [virtual] |
Starts execution of the processor.
Attempts to start the number of threads specified for the processor, initializes their states and sets them running. On failure it returns a negative value.
number_of_threads | Positive value indicating the number of threads to spawn for the processor. | |
stacksize | The thread stack size to use for this processor. |
Implements UDPNetProcessor.
Definition at line 89 of file UnixUDPNet.cc.
References EventProcessor::allocate(), ET_UDP, eventProcessor, EventProcessor::eventthread, initialize_thread_for_udp_net(), EventProcessor::n_threads_for_type, pollCont_offset, EventProcessor::spawn_event_threads(), and udpNetHandler_offset.
int UDPNetProcessorInternal::udp_callback | ( | UDPNetHandler * | nh, | |
UDPConnection * | uc, | |||
EThread * | thread | |||
) |
Definition at line 151 of file UnixUDPNet.cc.
References UDPConnection::AddRef(), UnixUDPConnection::callbackAction, UnixUDPConnection::callbackHandler(), UDPConnectionInternal::continuation, eventProcessor, ink_assert, Continuation::mutex, MUTEX_TRY_LOCK_FOR, and EventProcessor::schedule_imm().
Referenced by UDPNetHandler::mainNetEvent().
void UDPNetProcessorInternal::udp_read_from_net | ( | UDPNetHandler * | nh, | |
UDPConnection * | uc | |||
) |
Definition at line 108 of file UnixUDPNet.cc.
References UDPConnection::AddRef(), ats_ip_sa_cast(), Debug, UDPConnection::getFd(), ink_assert, ink_atomiclist_push(), UnixUDPConnection::inQueue, new_incoming_UDPPacket(), UnixUDPConnection::onCallbackQueue, SocketManager::recvfrom(), UDPPacket::setConnection(), and socketManager.
Referenced by UDPNetHandler::mainNetEvent().
Definition at line 53 of file P_UDPNet.h.
Referenced by get_UDPPollCont(), and start().
Definition at line 54 of file P_UDPNet.h.
Referenced by get_UDPNetHandler(), and start().