Belle II Software development
REvtSocketSend Class Reference

Public Member Functions

 REvtSocketSend (int port, bool accept_at_init=true)
 
int status ()
 
int send (EvtMessage *msg)
 
EvtMessagerecv (void)
 
int send_buffer (int size, char *buf)
 
int recv_buffer (char *buf)
 
RSocketSendsock (void)
 

Private Attributes

RSocketSendm_sock
 
char * m_recbuf
 

Detailed Description

Definition at line 46 of file REvtSocket.h.

Constructor & Destructor Documentation

◆ REvtSocketSend()

REvtSocketSend ( int  port,
bool  accept_at_init = true 
)

Definition at line 60 of file REvtSocket.cc.

61{
62 m_sock = new RSocketSend((u_short)port);
63 m_recbuf = new char[MAXEVTSIZE];
64 if (accept_at_init)
65 m_sock->accept();
66}

◆ ~REvtSocketSend()

Definition at line 68 of file REvtSocket.cc.

69{
70 delete m_sock;
71 delete[] m_recbuf;
72}

Member Function Documentation

◆ recv_buffer()

int recv_buffer ( char *  buf)

Definition at line 93 of file REvtSocket.cc.

94{
95 int stat = m_sock->get(buf, MAXEVTSIZE);
96 return stat;
97}

◆ send()

int send ( EvtMessage msg)

Definition at line 83 of file REvtSocket.cc.

84{
85 return m_sock->put((char*)msg->buffer(), msg->size());
86}
char * buffer()
Get buffer address.
Definition: EvtMessage.cc:76
int size() const
Get size of message including headers.
Definition: EvtMessage.cc:94

◆ send_buffer()

int send_buffer ( int  size,
char *  buf 
)

Definition at line 88 of file REvtSocket.cc.

89{
90 return m_sock->put(buf, nbytes);
91}

◆ sock()

RSocketSend * sock ( void  )

Definition at line 99 of file REvtSocket.cc.

100{
101 return m_sock;
102}

Member Data Documentation

◆ m_recbuf

char* m_recbuf
private

Definition at line 63 of file REvtSocket.h.

◆ m_sock

RSocketSend* m_sock
private

Definition at line 62 of file REvtSocket.h.


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