Belle II Software development
Sender Class Reference

Public Member Functions

 Sender (int port, EvtBuffer *buf)
 
void run ()
 

Private Attributes

int m_port
 
EvtBufferm_buf
 

Detailed Description

Definition at line 115 of file stevtserver.cc.

Constructor & Destructor Documentation

◆ Sender()

Sender ( int  port,
EvtBuffer buf 
)
inline

Definition at line 117 of file stevtserver.cc.

118 : m_port(port), m_buf(buf) {}

Member Function Documentation

◆ run()

void run ( )
inline

Definition at line 121 of file stevtserver.cc.

122 {
123 TCPServerSocket server("0.0.0.0", m_port);
124 server.open();
125 while (true) {
126 TCPSocket socket;
127 try {
128 socket = server.accept();
129 socket.setBufferSize(32 * 1024 * 1024);
130 TCPSocketWriter writer(socket);
131 while (true) {
132 m_buf->read(writer);
133 }
134 } catch (const IOException& e) {
135 socket.close();
136 }
137 }
138 }

Member Data Documentation

◆ m_buf

EvtBuffer* m_buf
private

Definition at line 142 of file stevtserver.cc.

◆ m_port

int m_port
private

Definition at line 141 of file stevtserver.cc.


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