95 if (msg->isSelfMessage()) {
101 msg->setName(
"close");
106 GenericAppMsg *appmsg =
dynamic_cast<GenericAppMsg *
>(msg);
108 throw cRuntimeError(
"Message (%s)%s is not a GenericAppMsg -- " 109 "probably wrong client app, or wrong setting of TCP's " 110 "dataTransferMode parameters " 112 msg->getClassName(), msg->getName());
118 long requestedBytes = appmsg->getExpectedReplyLength();
120 simtime_t msgDelay = appmsg->getReplyDelay();
124 bool doClose = appmsg->getServerClose();
125 int connId = check_and_cast<TCPCommand *>(appmsg->getControlInfo())->getConnId();
127 if (requestedBytes == 0) {
131 delete appmsg->removeControlInfo();
132 TCPSendCommand *cmd =
new TCPSendCommand();
133 cmd->setConnId(connId);
134 appmsg->setControlInfo(cmd);
138 appmsg->setByteLength(requestedBytes);
143 cMessage *msg =
new cMessage(
"close");
145 TCPCommand *cmd =
new TCPCommand();
146 cmd->setConnId(connId);
147 msg->setControlInfo(cmd);
153 EV_WARN <<
"drop msg: " << msg->getName() <<
", kind:" << msg->getKind() <<
"(" << cEnum::get(
"inet::TcpStatusInd")->getStringFor(msg->getKind()) <<
")\n";
az accept haszálja pcb új connId
Definition: lwip_tcp.txt:38
Definition: TCPCommand_m.h:101
Definition: TCPCommand_m.h:99
Definition: TCPCommand_m.h:63
long msgsRcvd
Definition: TCPGenericSrvApp.h:39
static simsignal_t rcvdPkSignal
Definition: TCPGenericSrvApp.h:45
virtual void sendBack(cMessage *msg)
Definition: TCPGenericSrvApp.cc:75
Definition: TCPCommand_m.h:64
long bytesRcvd
Definition: TCPGenericSrvApp.h:41
simtime_t delay
Definition: TCPGenericSrvApp.h:36
Definition: TCPCommand_m.h:98
simtime_t maxMsgDelay
Definition: TCPGenericSrvApp.h:37
virtual void sendOrSchedule(cMessage *msg, simtime_t delay)
Definition: TCPGenericSrvApp.cc:67