#include <udp_server.h>
|
EventManager * | event_manager () |
|
virtual bool | DisableSandeshLogMessages () |
|
virtual std::string | ToString () |
|
virtual void | HandleReceive (const boost::asio::const_buffer &recv_buffer, boost::asio::ip::udp::endpoint remote_endpoint, std::size_t bytes_transferred, const boost::system::error_code &error) |
|
virtual void | OnRead (const boost::asio::const_buffer &recv_buffer, const boost::asio::ip::udp::endpoint &remote_endpoint) |
|
virtual int | reader_task_id () const |
|
virtual int | reader_task_instance (const boost::asio::ip::udp::endpoint &remote_endpoint) const |
|
virtual void | HandleSend (boost::asio::const_buffer send_buffer, boost::asio::ip::udp::endpoint remote_endpoint, std::size_t bytes_transferred, const boost::system::error_code &error) |
|
|
void | SetName (boost::asio::ip::udp::endpoint ep) |
|
void | HandleReceiveInternal (boost::asio::const_buffer recv_buffer, std::size_t bytes_transferred, const boost::system::error_code &error) |
|
void | HandleSendInternal (boost::asio::const_buffer send_buffer, boost::asio::ip::udp::endpoint remote_endpoint, std::size_t bytes_transferred, const boost::system::error_code &error) |
|
| DISALLOW_COPY_AND_ASSIGN (UdpServer) |
|
Definition at line 18 of file udp_server.h.
Enumerator |
---|
OK |
|
Uninitialized |
|
SocketOpenFailed |
|
SocketBindFailed |
|
Definition at line 23 of file udp_server.h.
UdpServer::UdpServer |
( |
boost::asio::io_context * |
io_service, |
|
|
int |
buffer_size = kDefaultBufferSize |
|
) |
| |
|
explicit |
UdpServer::~UdpServer |
( |
| ) |
|
|
virtual |
mutable_buffer UdpServer::AllocateBuffer |
( |
| ) |
|
mutable_buffer UdpServer::AllocateBuffer |
( |
std::size_t |
s | ) |
|
void UdpServer::DeallocateBuffer |
( |
const boost::asio::const_buffer & |
buffer | ) |
|
virtual bool UdpServer::DisableSandeshLogMessages |
( |
| ) |
|
|
inlineprotectedvirtual |
UdpServer::DISALLOW_COPY_AND_ASSIGN |
( |
UdpServer |
| ) |
|
|
private |
udp::endpoint UdpServer::GetLocalEndpoint |
( |
boost::system::error_code * |
error | ) |
const |
std::string UdpServer::GetLocalEndpointAddress |
( |
| ) |
const |
int UdpServer::GetLocalEndpointPort |
( |
| ) |
const |
void UdpServer::GetRxSocketStats |
( |
SocketIOStats * |
socket_stats | ) |
const |
void UdpServer::GetTxSocketStats |
( |
SocketIOStats * |
socket_stats | ) |
const |
void UdpServer::HandleReceive |
( |
const boost::asio::const_buffer & |
recv_buffer, |
|
|
boost::asio::ip::udp::endpoint |
remote_endpoint, |
|
|
std::size_t |
bytes_transferred, |
|
|
const boost::system::error_code & |
error |
|
) |
| |
|
protectedvirtual |
void UdpServer::HandleReceiveInternal |
( |
boost::asio::const_buffer |
recv_buffer, |
|
|
std::size_t |
bytes_transferred, |
|
|
const boost::system::error_code & |
error |
|
) |
| |
|
private |
void UdpServer::HandleSend |
( |
boost::asio::const_buffer |
send_buffer, |
|
|
boost::asio::ip::udp::endpoint |
remote_endpoint, |
|
|
std::size_t |
bytes_transferred, |
|
|
const boost::system::error_code & |
error |
|
) |
| |
|
protectedvirtual |
void UdpServer::HandleSendInternal |
( |
boost::asio::const_buffer |
send_buffer, |
|
|
boost::asio::ip::udp::endpoint |
remote_endpoint, |
|
|
std::size_t |
bytes_transferred, |
|
|
const boost::system::error_code & |
error |
|
) |
| |
|
private |
bool UdpServer::Initialize |
( |
unsigned short |
port | ) |
|
|
virtual |
bool UdpServer::Initialize |
( |
const std::string & |
ipaddress, |
|
|
unsigned short |
port |
|
) |
| |
|
virtual |
virtual bool UdpServer::Initialize |
( |
boost::asio::ip::udp::endpoint |
local_endpoint | ) |
|
|
virtual |
void UdpServer::OnRead |
( |
const boost::asio::const_buffer & |
recv_buffer, |
|
|
const boost::asio::ip::udp::endpoint & |
remote_endpoint |
|
) |
| |
|
protectedvirtual |
virtual int UdpServer::reader_task_id |
( |
| ) |
const |
|
inlineprotectedvirtual |
int UdpServer::reader_task_instance |
( |
const boost::asio::ip::udp::endpoint & |
remote_endpoint | ) |
const |
|
protectedvirtual |
void UdpServer::SetName |
( |
boost::asio::ip::udp::endpoint |
ep | ) |
|
|
private |
void UdpServer::Shutdown |
( |
void |
| ) |
|
|
virtual |
void UdpServer::StartReceive |
( |
| ) |
|
void UdpServer::StartSend |
( |
boost::asio::ip::udp::endpoint |
ep, |
|
|
std::size_t |
bytes_to_send, |
|
|
boost::asio::const_buffer |
buffer |
|
) |
| |
virtual std::string UdpServer::ToString |
( |
| ) |
|
|
inlineprotectedvirtual |
void intrusive_ptr_add_ref |
( |
UdpServer * |
server | ) |
|
|
friend |
void intrusive_ptr_release |
( |
UdpServer * |
server | ) |
|
|
friend |
int UdpServer::buffer_size_ |
|
private |
const int UdpServer::kDefaultBufferSize = 4 * 1024 |
|
static |
std::string UdpServer::name_ |
|
private |
std::vector<uint8_t *> UdpServer::pbuf_ |
|
private |
tbb::mutex UdpServer::pbuf_guard_ |
|
private |
int UdpServer::reader_task_id_ = -1 |
|
staticprivate |
tbb::atomic<int> UdpServer::refcount_ |
|
private |
boost::asio::ip::udp::endpoint UdpServer::remote_endpoint_ |
|
private |
boost::asio::ip::udp::socket UdpServer::socket_ |
|
private |
tbb::mutex UdpServer::state_guard_ |
|
private |
The documentation for this class was generated from the following files: