HttpBaseMessage¶
Namespace: simu5g
class HttpBaseMessage
Base class for HTTP messages
Usage diagram¶
Inheritance diagram¶
Extends¶
Name |
Type |
Description |
|---|---|---|
class |
(no description) |
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
class |
Message class for HTTP requests |
|
class |
Message class for HTTP replies |
Fields¶
Name |
Type |
Description |
|---|---|---|
id |
int |
|
mutable |
bool |
|
complete |
bool |
|
correct |
bool |
|
properlyRepresented |
bool |
|
chunkLength |
b |
|
rawBin |
string[] |
|
rawHex |
string[] |
|
regionTags |
SharingRegionTagSet::TagBaseRegionTag[] |
|
sockId |
int |
socket Id used to retrieve the tcp socket objects from the map |
state |
used to respond with the correct HTTP response |
|
isReceivingMsg |
bool |
flag used for HTTP msgs within more TCP segments |
type |
REQUEST or RESPONSE or UNKNOWN |
|
body |
string |
body of the HTTp message if present |
httpProtocol |
string |
http protocol, defaul HTTP/1.1 |
contentLength |
int |
Content-Length header |
remainingDataToRecv |
int |
Counter for HTTP msg within more TCP segments |
contentType |
string |
Content-Type header |
connection |
string |
Connection header |
arrivalTime |
simtime_t |
Point in time when the messagge arrives (used by the Service to calculate response time) |
Properties¶
Name |
Value |
Description |
|---|---|---|
beforeChange |
handleChange() |
|
descriptor |
readonly |
|
existingClass |
||
packetData |
Source code¶
//
// Base class for HTTP messages
//
class HttpBaseMessage extends inet::FieldsChunk
{
int sockId; // socket Id used to retrieve the tcp socket objects from the map
HttpRequestState state; // used to respond with the correct HTTP response
bool isReceivingMsg; // flag used for HTTP msgs within more TCP segments
HttpMsgType type; // REQUEST or RESPONSE or UNKNOWN
string body; // body of the HTTp message if present
string httpProtocol = "HTTP/1.1"; // http protocol, defaul HTTP/1.1
int contentLength; // Content-Length header
int remainingDataToRecv; // Counter for HTTP msg within more TCP segments
string contentType = "application/json"; // Content-Type header
string connection = "keep-alive"; // Connection header
simtime_t arrivalTime = 0; // Point in time when the messagge arrives (used by the Service to calculate response time)
}
File: src/simu5g/mec/platform/services/messages/HttpMessages.msg