8#ifndef _B2ARICH_UDPSocket_hh_
9#define _B2ARICH_UDPSocket_hh_
13#include <netinet/in.h>
15#include "daq/slc/system/FileDescriptor.h"
31 const std::string& hostname,
32 bool boardcast =
false);
35 bool boardcast =
false);
40 int bind(
unsigned int port,
41 const std::string& hostname =
"",
42 bool broadcast =
true);
43 const std::string getHostName()
const;
44 unsigned int getPort()
const;
45 unsigned int getAddress()
const;
46 const std::string getRemoteHostName()
const;
47 unsigned int getRemotePort()
const;
48 unsigned int getRemoteAddress()
const;
51 virtual size_t write(
const void* v,
size_t count);
52 virtual size_t read(
void* v,
size_t count);
55 struct sockaddr_in m_addr;
56 struct sockaddr_in m_remote_addr;
59 static unsigned int findSubnet(
unsigned int addr);
Abstract base class for different kinds of events.