|
| RevRb2Sock (std::string rbuf, int port, std::string shmname, int id) |
| Constuctor and Destructor.
|
|
int | SendEvent (void) |
| Event function.
|
|
Definition at line 24 of file RevRb2Sock.h.
◆ RevRb2Sock()
RevRb2Sock |
( |
std::string |
rbuf, |
|
|
int |
port, |
|
|
std::string |
shmname, |
|
|
int |
id |
|
) |
| |
Constuctor and Destructor.
Definition at line 16 of file RevRb2Sock.cc.
17{
18
21 m_evtbuf = new char[MAXEVTSIZE];
22 m_flow =
new RFFlowStat((
char*)shmname.c_str(),
id, m_rbuf);
23
24}
Class to manage a Ring Buffer placed in an IPC shared memory.
◆ ~RevRb2Sock()
Definition at line 26 of file RevRb2Sock.cc.
27{
28 delete m_sock;
29 delete m_rbuf;
30}
◆ SendEvent()
Event function.
Definition at line 32 of file RevRb2Sock.cc.
33{
34
35 int size;
36 while ((size = m_rbuf->
remq((
int*)m_evtbuf)) == 0) {
37
38
39 usleep(20);
40 }
41 m_flow->log(size * 4);
42
44
45 if (msg->
type() == MSG_TERMINATE) {
46 printf("EoF found. Exitting.....\n");
47 m_sock->send(msg);
48 delete msg;
49 return -1;
50 } else {
51 int is = m_sock->send(msg);
52 delete msg;
53 return is;
54
55 }
56}
Class to manage streamed object.
ERecordType type() const
Get record type.
int remq(int *buf)
Pick up a buffer from the RingBuffer.
◆ m_evtbuf
◆ m_flow
◆ m_rbuf
◆ m_sock
The documentation for this class was generated from the following files: