Public Member Functions | Private Attributes | List of all members
UDPServer Class Reference

#include <udp_server.h>

Public Member Functions

ssize_t recv (std::string &buffer)
 
ssize_t send (std::string &buffer)
 
bool set_timeout (int millisecs)
 
 UDPServer (std::string host, unsigned short port)
 
 ~UDPServer ()
 

Private Attributes

char buffer_ [BUFSIZE]
 
struct sockaddr_in clientaddr_
 
socklen_t clientlen_
 
std::string local_host_
 
unsigned short local_port_
 
int optval
 
struct sockaddr_in serveraddr_
 
int sockfd_
 
bool timeout_
 
struct timeval tv_
 

Detailed Description

Definition at line 62 of file udp_server.h.

Constructor & Destructor Documentation

UDPServer::UDPServer ( std::string  host,
unsigned short  port 
)
inline

Definition at line 65 of file udp_server.h.

UDPServer::~UDPServer ( )
inline

Definition at line 81 of file udp_server.h.

Member Function Documentation

ssize_t UDPServer::recv ( std::string &  buffer)
inline

Definition at line 113 of file udp_server.h.

ssize_t UDPServer::send ( std::string &  buffer)
inline

Definition at line 101 of file udp_server.h.

bool UDPServer::set_timeout ( int  millisecs)
inline

Definition at line 86 of file udp_server.h.

Member Data Documentation

char UDPServer::buffer_[BUFSIZE]
private

Definition at line 172 of file udp_server.h.

struct sockaddr_in UDPServer::clientaddr_
private

Definition at line 171 of file udp_server.h.

socklen_t UDPServer::clientlen_
private

Definition at line 169 of file udp_server.h.

std::string UDPServer::local_host_
private

Definition at line 163 of file udp_server.h.

unsigned short UDPServer::local_port_
private

Definition at line 164 of file udp_server.h.

int UDPServer::optval
private

Definition at line 173 of file udp_server.h.

struct sockaddr_in UDPServer::serveraddr_
private

Definition at line 170 of file udp_server.h.

int UDPServer::sockfd_
private

Definition at line 168 of file udp_server.h.

bool UDPServer::timeout_
private

Definition at line 165 of file udp_server.h.

struct timeval UDPServer::tv_
private

Definition at line 166 of file udp_server.h.


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


kuka_rsi_hw_interface
Author(s): Lars Tingelstad
autogenerated on Tue Oct 15 2019 03:33:54