|
| RevSock2Rb (std::string rbuf, std::string src, int port, std::string shmname, int id) |
| Constuctor and Destructor.
|
|
int | ReceiveEvent (void) |
| Event function.
|
|
int | Reconnect (int ntry) |
| Reconnect.
|
|
Definition at line 24 of file RevSock2Rb.h.
◆ RevSock2Rb()
RevSock2Rb |
( |
std::string |
rbuf, |
|
|
std::string |
src, |
|
|
int |
port, |
|
|
std::string |
shmname, |
|
|
int |
id |
|
) |
| |
Constuctor and Destructor.
Definition at line 16 of file RevSock2Rb.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.
◆ ~RevSock2Rb()
Definition at line 26 of file RevSock2Rb.cc.
27{
28 delete m_sock;
29 delete m_rbuf;
30}
◆ ReceiveEvent()
int ReceiveEvent |
( |
void |
| ) |
|
Event function.
Definition at line 32 of file RevSock2Rb.cc.
33{
34
36 if (msg == NULL) {
37 return 0;
38 }
39
40 if (msg->
type() == MSG_TERMINATE) {
41 return 0;
42
43
44 }
45 m_flow->log(msg->
size());
46
47
48 int stat = 0;
49 for (;;) {
51 if (stat >= 0) break;
52
53 usleep(20);
54 }
55 delete msg;
56 return stat;
57}
Class to manage streamed object.
int paddedSize() const
Same as size(), but as size of an integer array.
ERecordType type() const
Get record type.
char * buffer()
Get buffer address.
int size() const
Get size of message including headers.
int insq(const int *buf, int size, bool checkTx=false)
Append a buffer to the RingBuffer.
◆ Reconnect()
int Reconnect |
( |
int |
ntry | ) |
|
Reconnect.
Definition at line 59 of file RevSock2Rb.cc.
60{
61 return (m_sock->sock())->reconnect(ntimes);
62}
◆ m_evtbuf
◆ m_flow
◆ m_rbuf
◆ m_sock
The documentation for this class was generated from the following files: