GenericAppMsg¶
Namespace: inet
class GenericAppMsg
Message class for generic request-reply style applications. The client sends a GenericAppMsg which contains the number of bytes the client wants the server to send back as reply.
This way intelligence (behaviour specific to the modelled application, e.g. HTTP, SMB, database protocol) needs only to be present in the client, and the server model can be kept simple and dumb.
See also: TcpGenericServerApp, TCPGenericCliAppBase (C++ only)
Usage diagram¶
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
class |
(no description) |
Fields¶
Name |
Type |
Description |
|---|---|---|
id |
int |
|
mutable |
bool |
|
complete |
bool |
|
correct |
bool |
|
properlyRepresented |
bool |
|
chunkLength |
||
rawBin |
string[] |
|
rawHex |
string[] |
|
regionTags |
||
expectedReplyLength |
in bytes |
|
replyDelay |
double |
reply after this many seconds |
serverClose |
bool |
with TCP: if true, server should close the connection after sending the reply |
Properties¶
Name |
Value |
Description |
|---|---|---|
beforeChange |
handleChange() |
|
descriptor |
readonly |
|
existingClass |
||
packetData |
Source code¶
//
// Message class for generic request-reply style applications.
// The client sends a ~GenericAppMsg which contains the number of
// bytes the client wants the server to send back as reply.
//
// This way intelligence (behaviour specific to the modelled application,
// e.g. HTTP, SMB, database protocol) needs only to be present in
// the client, and the server model can be kept simple and dumb.
//
// @see ~TcpGenericServerApp, TCPGenericCliAppBase (C++ only)
//
class GenericAppMsg extends FieldsChunk
{
B expectedReplyLength; // in bytes
double replyDelay; // reply after this many seconds
bool serverClose; // with TCP: if true, server should close the
// connection after sending the reply
}