Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CUdpClient Class Reference

#include <UdpClient.h>

Inheritance diagram for CUdpClient:
CThread

Classes

struct  UdpCommand
 

Public Member Functions

 CUdpClient ()
 
 ~CUdpClient (void) override
 

Protected Types

typedef std::vector< UdpCommand >::iterator COMMANDITERATOR
 

Protected Member Functions

bool Create ()
 
void Destroy ()
 
void OnStartup () override
 
void Process () override
 
bool Broadcast (int aPort, const std::string &aMessage)
 
bool Send (const std::string &aIpAddress, int aPort, const std::string &aMessage)
 
bool Send (struct sockaddr_in aAddress, const std::string &aMessage)
 
bool Send (struct sockaddr_in aAddress, unsigned char *pMessage, DWORD dwSize)
 
virtual void OnMessage (struct sockaddr_in &aRemoteAddress, const std::string &aMessage, unsigned char *pMessage, DWORD dwMessageLength)
 
bool DispatchNextCommand ()
 

Protected Attributes

SOCKET client_socket
 
std::vector< UdpCommandcommands
 
CCriticalSection critical_section
 

Member Typedef Documentation

◆ COMMANDITERATOR

std::vector<UdpCommand>::iterator CUdpClient::COMMANDITERATOR
protected

Constructor & Destructor Documentation

◆ CUdpClient()

CUdpClient::CUdpClient ( void )

◆ ~CUdpClient()

CUdpClient::~CUdpClient ( void )
overridedefault

Member Function Documentation

◆ Broadcast()

bool CUdpClient::Broadcast ( int aPort,
const std::string & aMessage )
protected

◆ Create()

bool CUdpClient::Create ( void )
protected

◆ Destroy()

void CUdpClient::Destroy ( )
protected

◆ DispatchNextCommand()

bool CUdpClient::DispatchNextCommand ( )
protected

◆ OnMessage()

virtual void CUdpClient::OnMessage ( struct sockaddr_in & aRemoteAddress,
const std::string & aMessage,
unsigned char * pMessage,
DWORD dwMessageLength )
inlineprotectedvirtual

◆ OnStartup()

void CUdpClient::OnStartup ( )
overrideprotectedvirtual

Reimplemented from CThread.

◆ Process()

void CUdpClient::Process ( void )
overrideprotectedvirtual

Reimplemented from CThread.

◆ Send() [1/3]

bool CUdpClient::Send ( const std::string & aIpAddress,
int aPort,
const std::string & aMessage )
protected

◆ Send() [2/3]

bool CUdpClient::Send ( struct sockaddr_in aAddress,
const std::string & aMessage )
protected

◆ Send() [3/3]

bool CUdpClient::Send ( struct sockaddr_in aAddress,
unsigned char * pMessage,
DWORD dwSize )
protected

Member Data Documentation

◆ client_socket

SOCKET CUdpClient::client_socket
protected

◆ commands

std::vector<UdpCommand> CUdpClient::commands
protected

◆ critical_section

CCriticalSection CUdpClient::critical_section
protected

The documentation for this class was generated from the following files: