|
| Sock2Rb (std::string rbuf, int port) |
| Constuctor and Destructor.
|
|
int | ReceiveEvent (void) |
| Event function.
|
|
Definition at line 23 of file Sock2Rb.h.
◆ Sock2Rb()
Sock2Rb |
( |
std::string | rbuf, |
|
|
int | port ) |
Constuctor and Destructor.
Definition at line 16 of file Sock2Rb.cc.
17{
18
19 m_rbuf = new RingBuffer(rbuf.c_str());
20 m_sock = new EvtSocketRecv(port);
21 m_evtbuf = new char[MAXEVTSIZE];
22
23}
◆ ~Sock2Rb()
Definition at line 25 of file Sock2Rb.cc.
26{
27 delete m_sock;
28 delete m_rbuf;
29}
◆ ReceiveEvent()
int ReceiveEvent |
( |
void | | ) |
|
Event function.
Definition at line 31 of file Sock2Rb.cc.
32{
33
34 EvtMessage* msg = m_sock->recv();
35 if (msg == NULL) {
36 return 0;
37 }
38
39 if (msg->
type() == MSG_TERMINATE) {
40 return 0;
41
42
43 }
44
45
46 int stat = 0;
47 for (;;) {
49 if (stat >= 0) break;
50
51 usleep(20);
52 }
53 delete msg;
54 return stat;
55}
int paddedSize() const
Same as size(), but as size of an integer array.
ERecordType type() const
Get record type.
char * buffer()
Get buffer address.
◆ m_evtbuf
◆ m_rbuf
◆ m_sock
The documentation for this class was generated from the following files: