#include <TcpEchoApp.h>
◆ dataArrived()
| void inet::TcpEchoAppThread::dataArrived |
( |
Packet * |
msg, |
|
|
bool |
urgent |
|
) |
| |
|
overridevirtual |
Implements inet::TcpServerThreadBase.
83 int64_t rcvdBytes = rcvdPkt->getByteLength();
87 Packet *outPkt =
new Packet(rcvdPkt->getName(),
TCP_C_SEND);
89 int socketId = rcvdPkt->getTag<SocketInd>()->getSocketId();
90 outPkt->addTag<SocketReq>()->setSocketId(socketId);
98 for (; len + rcvdBytes <= outByteLen; len += rcvdBytes) {
99 outPkt->insertAtBack(rcvdPkt->peekDataAt(
B(0),
B(rcvdBytes)));
101 if (len < outByteLen)
102 outPkt->insertAtBack(rcvdPkt->peekDataAt(
B(0),
B(outByteLen - len)));
104 ASSERT(outPkt->getByteLength() == outByteLen);
◆ established()
| void inet::TcpEchoAppThread::established |
( |
| ) |
|
|
overridevirtual |
◆ init()
◆ timerExpired()
| void inet::TcpEchoAppThread::timerExpired |
( |
cMessage * |
timer | ) |
|
|
overridevirtual |
Implements inet::TcpServerThreadBase.
119 Packet *pkt = check_and_cast<Packet *>(timer);
120 pkt->setContextPointer(
nullptr);
◆ echoAppModule
| TcpEchoApp* inet::TcpEchoAppThread::echoAppModule = nullptr |
|
protected |
The documentation for this class was generated from the following files: